ulab.numpy
– Numerical approximation methods
x (ulab.numpy.ndarray) – The x-coordinates at which to evaluate the interpolated values.
xp (ulab.numpy.ndarray) – The x-coordinates of the data points, must be increasing
fp (ulab.numpy.ndarray) – The y-coordinates of the data points, same length as xp
left – Value to return for x < xp[0]
, default is fp[0]
.
right – Value to return for x > xp[-1]
, default is fp[-1]
.
Returns the one-dimensional piecewise linear interpolant to a function with given discrete data points (xp, fp), evaluated at x.
y (1D ulab.numpy.ndarray) – the values of the dependent variable
x (1D ulab.numpy.ndarray) – optional, the coordinates of the independent variable. Defaults to uniformly spaced values.
dx (float) – the spacing between sample points, if x=None
Returns the integral of y(x) using the trapezoidal rule.
Clips (limits) the values in an array.
a – Scalar or array containing elements to clip.
a_min – Minimum value, it will be broadcast against a
.
a_max – Maximum value, it will be broadcast against a
.
A scalar or array with the elements of a
, but where values < a_min
are replaced with a_min
, and those > a_max
with a_max
.
Returns x == y
element-wise.
y (x,) – Input scalar or array. If x.shape != y.shape
they must be broadcastable to a common shape (which becomes the shape of the output.)
A boolean scalar or array with the element-wise result of x == y
.
Returns x != y
element-wise.
y (x,) – Input scalar or array. If x.shape != y.shape
they must be broadcastable to a common shape (which becomes the shape of the output.)
A boolean scalar or array with the element-wise result of x != y
.
Tests element-wise for finiteness (i.e., it should not be infinity or a NaN).
x – Input scalar or ndarray.
A boolean scalar or array with True where x
is finite, and False otherwise.
Tests element-wise for positive or negative infinity.
x – Input scalar or ndarray.
A boolean scalar or array with True where x
is positive or negative infinity, and False otherwise.
Returns the element-wise maximum.
x2 (x1,) – Input scalar or array. If x.shape != y.shape
they must be broadcastable to a common shape (which becomes the shape of the output.)
A scalar or array with the element-wise maximum of x1
and x2
.
Returns the element-wise minimum.
x2 (x1,) – Input scalar or array. If x.shape != y.shape
they must be broadcastable to a common shape (which becomes the shape of the output.)
A scalar or array with the element-wise minimum of x1
and x2
.
Returns the indices of elements that are non-zero.
x – Input scalar or array. If x
is a scalar, it is treated as a single-element 1-d array.
An array of indices that are non-zero.
Returns elements from x
or y
depending on condition
.
condition – Input scalar or array. If an element (or scalar) is truthy, the corresponding element from x
is chosen, otherwise y
is used. condition
, x
and y
must also be broadcastable to the same shape (which becomes the output shape.)
y (x,) – Input scalar or array.
An array with elements from x
when condition
is truthy, and y
elsewhere.
Return a new 1-D array with elements ranging from start
to stop
, with step size step
.
Join a sequence of arrays along an existing axis.
Return specified diagonals.
Return a new array of the given shape with all elements set to 0. An alias for numpy.zeros.
Return a new square array of size, with the diagonal elements set to 1 and the other elements set to 0. If k is given, the diagonal is shifted by the specified amount.
Return a new array of the given shape with all elements set to 0.
Return a new 1-D array with num
elements ranging from start
to stop
linearly.
Return a new 1-D array with num
evenly spaced elements on a log scale. The sequence starts at base ** start
, and ends with base ** stop
.
Return a new array of the given shape with all elements set to 1.
Return a new array of the given shape with all elements set to 0.
ulab.numpy.int8
, ulab.numpy.uint8
, ulab.numpy.int16
, ulab.numpy.uint16
, ulab.numpy.float
or ulab.numpy.bool
Type code for signed integers in the range -128 .. 127 inclusive, like the ‘b’ typecode of array.array
Type code for signed integers in the range -32768 .. 32767 inclusive, like the ‘h’ typecode of array.array
Type code for floating point values, like the ‘f’ typecode of array.array
Type code for unsigned integers in the range 0 .. 255 inclusive, like the ‘H’ typecode of array.array
Type code for unsigned integers in the range 0 .. 65535 inclusive, like the ‘h’ typecode of array.array
Type code for boolean values
Return the index of the maximum element of the 1D array
Return the index of the minimum element of the 1D array
Returns an array which gives indices into the input array from least to greatest.
Return the cross product of two vectors of length 3
Return the numerical derivative of successive elements of the array, as an array. axis=None is not supported.
Returns a new array that reverses the order of the elements along the given axis, or along all axes if axis is None.
Return the maximum element of the 1D array
Return the mean element of the 1D array, as a number if axis is None, otherwise as an array.
Find the median value in an array along the given axis, or along all axes if axis is None.
Return the minimum element of the 1D array
Shift the content of a vector by the positions given as the second argument. If the axis
keyword is supplied, the shift is applied to the given axis. The array is modified in place.
Sort the array along the given axis, or along all axes if axis is None. The array is modified in place.
Return the standard deviation of the array, as a number if axis is None, otherwise as an array.
Return the sum of the array, as a number if axis is None, otherwise as an array.
Get printing options
Set printing options
alternate constructor function for ulab.numpy.ndarray
. Mirrors numpy.array
m – a square matrix
Compute the trace of the matrix, the sum of its diagonal elements.
Computes the product of two matrices, or two vectors. In the letter case, the inner product is returned.
Computes the inverse cosine function
Computes the inverse hyperbolic cosine function
Computes the inverse sine function
Computes the inverse hyperbolic sine function
Returns a new float array in which each element is rounded to decimals
places.
Computes the inverse tangent function; the return values are in the range [-pi/2,pi/2].
Computes the inverse hyperbolic tangent function
Computes the inverse tangent function of y/x; the return values are in the range [-pi, pi].
Rounds numbers up to the next whole number
Computes the cosine function
Computes the hyperbolic cosine function
Converts angles from radians to degrees
Computes the error function, which has applications in statistics
Computes the complementary error function, which has applications in statistics
Computes the exponent function.
Computes $e^x-1$. In certain applications, using this function preserves numeric accuracy better than the exp
function.
Rounds numbers up to the next whole number
Computes the gamma function
Computes the natural log of the gamma function
Computes the natural log
Computes the log base 10
Computes the log base 2
Converts angles from degrees to radians
Computes the sine function
Computes the normalized sinc function
Computes the hyperbolic sine
Computes the square root
Computes the tangent
Computes the hyperbolic tangent
f (callable) – The function to wrap
otypes – List of array types that may be returned by the function. None is interpreted to mean the return value is float.
Wrap a Python function f
so that it can be applied to arrays or scalars. A scalar passed to the wrapped function is treated as a single-element 1-D array. The callable must return only values of the types specified by otypes
, or the result is undefined.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4