Numerical Tools  1.0
Numerical tools from SciPy and Numerical Methods in Physics with Python
NumericalTools.NPutils Class Reference

Simple dot and matrix multiplication routines that assume inputs are well formed and compatible. More...

Static Public Member Functions

static double [] Abs (double[] v)
 
static int [] Add (int[] a, int[] b)
 
static double [] Array (List< double > list)
 
static int [] Arange (int stop)
 
static int [] Arange (int start, int stop)
 
static double [] ArangeDouble (int start, int stop)
 Create an array of double filled with integer values [start, stop) (from start to stop-1) More...
 
static double [,] CumProd (double[,] p, int axis)
 https://numpy.org/doc/stable/reference/generated/numpy.cumprod.html?highlight=cumprod#numpy.cumprod Return the cumulative product of elements along a given axis. More...
 
static int [] HstackInt (params System.Array[] arrays)
 
static double [] HstackDouble (params System.Array[] arrays)
 
static double [] Linspace (double from, double to, int numSteps)
 return numSteps equally spaced points in the range to..from More...
 
static double [] Ravel (double[,] a)
 
static double [] Ravel (double[,,] a)
 
static int [] Repeat (int[] a, int n)
 
static double [,] Reshape2D (double[] x, int m, int n)
 Reshape a linear array into a 2D array of size m x n More...
 
static double [,] Sqrt (double[,] a)
 
static int [] Tile (int[] a, int n)
 
static double [,] Tril (double[,] a)
 Return a copy of the array with all entries above the main diagonal zeroed. More...
 
static double [,] Triu (double[,] a)
 Return a copy of the array with all entried below the main diagonal zero More...
 
static void ScaleV (double scale, double[] v)
 
static double [,] Tile (double[] A, int reps1, int reps2)
 Numpy.tile for the case where reps is a 2-tuple More...
 
static double VdotV (double[] v1, double[] v2)
 
static double [,] AdotA (double[,] a, double[,] b)
 Matrix mutliply. More...
 
static double [] AdotV (double[,] a, double[] v)
 
static double [] ATdotV (double[,] a, double[] v)
 
static double [,] AmulA (double[,] a, double[,] b)
 
static double [,] ATmulA (double[,] a, double[,] b)
 
static double NextAfter (double x1, double x2)
 
static List< int > Nonzero (bool[] b)
 NumPy non-zero for bool array. More...
 
static double Max (double[] v1, double[] v2)
 
static int SearchSorted (double[] a, double value, bool leftSide)
 Mimic NumPy.SearchSorted https://numpy.org/doc/1.18/reference/generated/numpy.searchsorted.html More...
 
static List< int > SearchSorted (List< double > a, double[] values, bool leftSide)
 
static int [] SearchSorted (double[] a, double[] values, bool leftSide)
 
static double [,] Transpose (double[,] a)
 
static double [] Diff (double[] a)
 Mimic numpy.diff() https://numpy.org/doc/1.18/reference/generated/numpy.diff.html?highlight=diff#numpy.diff More...
 
static double [] Diff (List< double > a)
 
static bool AllPos (double[] a)
 
static bool AllNeg (double[] a)
 
static int [] Argsort (double[] a)
 
static int [] Argsort (List< double > a)
 
static double [,,] Transpose201 (double[,,] m)
 Special case transpose used in BVP. More...
 

Detailed Description

Simple dot and matrix multiplication routines that assume inputs are well formed and compatible.

Member Function Documentation

◆ AdotA()

static double [,] NumericalTools.NPutils.AdotA ( double  a[,],
double  b[,] 
)
inlinestatic

Matrix mutliply.

Parameters
a
b
Returns

◆ ArangeDouble()

static double [] NumericalTools.NPutils.ArangeDouble ( int  start,
int  stop 
)
inlinestatic

Create an array of double filled with integer values [start, stop) (from start to stop-1)

Parameters
start
stop
Returns

◆ CumProd()

static double [,] NumericalTools.NPutils.CumProd ( double  p[,],
int  axis 
)
inlinestatic

https://numpy.org/doc/stable/reference/generated/numpy.cumprod.html?highlight=cumprod#numpy.cumprod Return the cumulative product of elements along a given axis.

This version specializes to 2-D double only

Parameters
p
axis
Returns

◆ Diff()

static double [] NumericalTools.NPutils.Diff ( double []  a)
inlinestatic

◆ Linspace()

static double [] NumericalTools.NPutils.Linspace ( double  from,
double  to,
int  numSteps 
)
inlinestatic

return numSteps equally spaced points in the range to..from

Parameters
from
to
numSteps
Returns

◆ Nonzero()

static List<int> NumericalTools.NPutils.Nonzero ( bool []  b)
inlinestatic

NumPy non-zero for bool array.

Parameters
b
Returns

◆ Reshape2D()

static double [,] NumericalTools.NPutils.Reshape2D ( double []  x,
int  m,
int  n 
)
inlinestatic

Reshape a linear array into a 2D array of size m x n

Parameters
x
m
n
Returns

◆ SearchSorted()

static int NumericalTools.NPutils.SearchSorted ( double []  a,
double  value,
bool  leftSide 
)
inlinestatic

Mimic NumPy.SearchSorted https://numpy.org/doc/1.18/reference/generated/numpy.searchsorted.html

Find indices where element(s) should be inserted to maintain order.

If left side is false, then want the rightmost location

Parameters
a
value
leftSide
Returns

◆ Tile()

static double [,] NumericalTools.NPutils.Tile ( double []  A,
int  reps1,
int  reps2 
)
inlinestatic

Numpy.tile for the case where reps is a 2-tuple

Parameters
A
reps1Number of repititions along axis 1
reps2Number of repititions along axis 2
Returns

◆ Transpose201()

static double [,,] NumericalTools.NPutils.Transpose201 ( double  m[,,])
inlinestatic

Special case transpose used in BVP.

Parameters
m
rows
Returns

◆ Tril()

static double [,] NumericalTools.NPutils.Tril ( double  a[,])
inlinestatic

Return a copy of the array with all entries above the main diagonal zeroed.

Parameters
a
Returns

◆ Triu()

static double [,] NumericalTools.NPutils.Triu ( double  a[,])
inlinestatic

Return a copy of the array with all entried below the main diagonal zero

Parameters
a
Returns

The documentation for this class was generated from the following file: