doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
numpy.histogram2d numpy.histogram2d(x, y, bins=10, range=None, normed=None, weights=None, density=None)[source] Compute the bi-dimensional histogram of two data samples. Parameters xarray_like, shape (N,) An array containing the x coordinates of the points to be histogrammed. yarray_like, shape (N,) An ar...
numpy.reference.generated.numpy.histogram2d
numpy.histogram_bin_edges numpy.histogram_bin_edges(a, bins=10, range=None, weights=None)[source] Function to calculate only the edges of the bins used by the histogram function. Parameters aarray_like Input data. The histogram is computed over the flattened array. binsint or sequence of scalars or str, opt...
numpy.reference.generated.numpy.histogram_bin_edges
numpy.histogramdd numpy.histogramdd(sample, bins=10, range=None, normed=None, weights=None, density=None)[source] Compute the multidimensional histogram of some data. Parameters sample(N, D) array, or (D, N) array_like The data to be histogrammed. Note the unusual interpretation of sample when an array_like: ...
numpy.reference.generated.numpy.histogramdd
numpy.hsplit numpy.hsplit(ary, indices_or_sections)[source] Split an array into multiple sub-arrays horizontally (column-wise). Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension. See also split Spl...
numpy.reference.generated.numpy.hsplit
numpy.hstack numpy.hstack(tup)[source] Stack arrays in sequence horizontally (column wise). This is equivalent to concatenation along the second axis, except for 1-D arrays where it concatenates along the first axis. Rebuilds arrays divided by hsplit. This function makes most sense for arrays with up to 3 dimension...
numpy.reference.generated.numpy.hstack
numpy.hypot numpy.hypot(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'hypot'> Given the “legs” of a right triangle, return its hypotenuse. Equivalent to sqrt(x1**2 + x2**2), element-wise. If x1 or x2 is scalar_like (i.e., unambiguously cas...
numpy.reference.generated.numpy.hypot
numpy.i0 numpy.i0(x)[source] Modified Bessel function of the first kind, order 0. Usually denoted \(I_0\). Parameters xarray_like of float Argument of the Bessel function. Returns outndarray, shape = x.shape, dtype = float The modified Bessel function evaluated at each of the elements of x. See a...
numpy.reference.generated.numpy.i0
numpy.identity numpy.identity(n, dtype=None, *, like=None)[source] Return the identity array. The identity array is a square array with ones on the main diagonal. Parameters nint Number of rows (and columns) in n x n output. dtypedata-type, optional Data-type of the output. Defaults to float. likearray_...
numpy.reference.generated.numpy.identity
numpy.iinfo class numpy.iinfo(type)[source] Machine limits for integer types. Parameters int_typeinteger type, dtype, or instance The kind of integer data type to get information about. See also finfo The equivalent for floating point data types. Examples With types: >>> ii16 = np.iinfo(np.int16) >>...
numpy.reference.generated.numpy.iinfo
numpy.imag numpy.imag(val)[source] Return the imaginary part of the complex argument. Parameters valarray_like Input array. Returns outndarray or scalar The imaginary component of the complex argument. If val is real, the type of val is used for the output. If val has complex elements, the returned ty...
numpy.reference.generated.numpy.imag
numpy.in1d numpy.in1d(ar1, ar2, assume_unique=False, invert=False)[source] Test whether each element of a 1-D array is also present in a second array. Returns a boolean array the same length as ar1 that is True where an element of ar1 is in ar2 and False otherwise. We recommend using isin instead of in1d for new co...
numpy.reference.generated.numpy.in1d
numpy.indices numpy.indices(dimensions, dtype=<class 'int'>, sparse=False)[source] Return an array representing the indices of a grid. Compute an array where the subarrays contain index values 0, 1, … varying only along the corresponding axis. Parameters dimensionssequence of ints The shape of the grid. dty...
numpy.reference.generated.numpy.indices
Constants NumPy includes several constants: numpy.Inf IEEE 754 floating point representation of (positive) infinity. Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf. See Also inf numpy.Infinity IEEE 754 floating point representation of (positive) infinity. Use inf ...
numpy.reference.constants
numpy.inf IEEE 754 floating point representation of (positive) infinity. Returns yfloat A floating point representation of positive infinity. See Also isinf : Shows which elements are positive or negative infinity isposinf : Shows which elements are positive infinity isneginf : Shows which elements are negative ...
numpy.reference.constants#numpy.inf
numpy.Infinity IEEE 754 floating point representation of (positive) infinity. Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf. See Also inf
numpy.reference.constants#numpy.Infinity
numpy.info numpy.info(object=None, maxwidth=76, output=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, toplevel='numpy')[source] Get help information for a function, class, or module. Parameters objectobject or str, optional Input object or name to get information about. If object is a numpy ob...
numpy.reference.generated.numpy.info
numpy.infty IEEE 754 floating point representation of (positive) infinity. Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf. See Also inf
numpy.reference.constants#numpy.infty
numpy.inner numpy.inner(a, b, /) Inner product of two arrays. Ordinary inner product of vectors for 1-D arrays (without complex conjugation), in higher dimensions a sum product over the last axes. Parameters a, barray_like If a and b are nonscalar, their last dimensions must match. Returns outndarray ...
numpy.reference.generated.numpy.inner
numpy.insert numpy.insert(arr, obj, values, axis=None)[source] Insert values along the given axis before the given indices. Parameters arrarray_like Input array. objint, slice or sequence of ints Object that defines the index or indices before which values is inserted. New in version 1.8.0. Support for ...
numpy.reference.generated.numpy.insert
numpy.int8[source] numpy.int16 numpy.int32 numpy.int64 Aliases for the signed integer types (one of numpy.byte, numpy.short, numpy.intc, numpy.int_ and numpy.longlong) with the specified number of bits. Compatible with the C99 int8_t, int16_t, int32_t, and int64_t, respectively.
numpy.reference.arrays.scalars#numpy.int16
numpy.int8[source] numpy.int16 numpy.int32 numpy.int64 Aliases for the signed integer types (one of numpy.byte, numpy.short, numpy.intc, numpy.int_ and numpy.longlong) with the specified number of bits. Compatible with the C99 int8_t, int16_t, int32_t, and int64_t, respectively.
numpy.reference.arrays.scalars#numpy.int32
numpy.int8[source] numpy.int16 numpy.int32 numpy.int64 Aliases for the signed integer types (one of numpy.byte, numpy.short, numpy.intc, numpy.int_ and numpy.longlong) with the specified number of bits. Compatible with the C99 int8_t, int16_t, int32_t, and int64_t, respectively.
numpy.reference.arrays.scalars#numpy.int64
numpy.int8[source] numpy.int16 numpy.int32 numpy.int64 Aliases for the signed integer types (one of numpy.byte, numpy.short, numpy.intc, numpy.int_ and numpy.longlong) with the specified number of bits. Compatible with the C99 int8_t, int16_t, int32_t, and int64_t, respectively.
numpy.reference.arrays.scalars#numpy.int8
class numpy.int_[source] Signed integer type, compatible with Python int and C long. Character code 'l' Alias on this platform (Linux x86_64) numpy.int64: 64-bit signed integer (-9_223_372_036_854_775_808 to 9_223_372_036_854_775_807). Alias on this platform (Linux x86_64) numpy.intp: Signed integer large enoug...
numpy.reference.arrays.scalars#numpy.int_
class numpy.intc[source] Signed integer type, compatible with C int. Character code 'i' Alias on this platform (Linux x86_64) numpy.int32: 32-bit signed integer (-2_147_483_648 to 2_147_483_647).
numpy.reference.arrays.scalars#numpy.intc
numpy.interp numpy.interp(x, xp, fp, left=None, right=None, period=None)[source] One-dimensional linear interpolation for monotonically increasing sample points. Returns the one-dimensional piecewise linear interpolant to a function with given discrete data points (xp, fp), evaluated at x. Parameters xarray_lik...
numpy.reference.generated.numpy.interp
numpy.intersect1d numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source] Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters ar1, ar2array_like Input arrays. Will be flattened if not already 1D. assume_uniquebool If...
numpy.reference.generated.numpy.intersect1d
numpy.intp[source] Alias for the signed integer type (one of numpy.byte, numpy.short, numpy.intc, numpy.int_ and np.longlong) that is the same size as a pointer. Compatible with the C intptr_t. Character code 'p'
numpy.reference.arrays.scalars#numpy.intp
numpy.invert numpy.invert(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'invert'> Compute bit-wise inversion, or bit-wise NOT, element-wise. Computes the bit-wise NOT of the underlying binary representation of the integers in the input arrays. T...
numpy.reference.generated.numpy.invert
numpy.is_busday numpy.is_busday(dates, weekmask='1111100', holidays=None, busdaycal=None, out=None) Calculates which of the given dates are valid days, and which are not. New in version 1.7.0. Parameters datesarray_like of datetime64[D] The array of dates to process. weekmaskstr or array_like of bool, opt...
numpy.reference.generated.numpy.is_busday
numpy.isclose numpy.isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source] Returns a boolean array where two arrays are element-wise equal within a tolerance. The tolerance values are positive, typically very small numbers. The relative difference (rtol * abs(b)) and the absolute difference atol are added t...
numpy.reference.generated.numpy.isclose
numpy.iscomplex numpy.iscomplex(x)[source] Returns a bool array, where True if input element is complex. What is tested is whether the input has a non-zero imaginary part, not if the input type is complex. Parameters xarray_like Input array. Returns outndarray of bools Output array. See also isr...
numpy.reference.generated.numpy.iscomplex
numpy.iscomplexobj numpy.iscomplexobj(x)[source] Check for a complex type or an array of complex numbers. The type of the input is checked, not the value. Even if the input has an imaginary part equal to zero, iscomplexobj evaluates to True. Parameters xany The input can be of any type and shape. Returns ...
numpy.reference.generated.numpy.iscomplexobj
numpy.isfinite numpy.isfinite(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'isfinite'> Test element-wise for finiteness (not infinity and not Not a Number). The result is returned as a boolean array. Parameters xarray_like Input values. ...
numpy.reference.generated.numpy.isfinite
numpy.isfortran numpy.isfortran(a)[source] Check if the array is Fortran contiguous but not C contiguous. This function is obsolete and, because of changes due to relaxed stride checking, its return value for the same array may differ for versions of NumPy >= 1.10.0 and previous versions. If you only want to check ...
numpy.reference.generated.numpy.isfortran
numpy.isin numpy.isin(element, test_elements, assume_unique=False, invert=False)[source] Calculates element in test_elements, broadcasting over element only. Returns a boolean array of the same shape as element that is True where an element of element is in test_elements and False otherwise. Parameters elementa...
numpy.reference.generated.numpy.isin
numpy.isinf numpy.isinf(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'isinf'> Test element-wise for positive or negative infinity. Returns a boolean array of the same shape as x, True where x == +/-inf, otherwise False. Parameters xarray_li...
numpy.reference.generated.numpy.isinf
numpy.isnan numpy.isnan(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'isnan'> Test element-wise for NaN and return result as a boolean array. Parameters xarray_like Input array. outndarray, None, or tuple of ndarray and None, optional ...
numpy.reference.generated.numpy.isnan
numpy.isnat numpy.isnat(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'isnat'> Test element-wise for NaT (not a time) and return result as a boolean array. New in version 1.13.0. Parameters xarray_like Input array with datetime or timede...
numpy.reference.generated.numpy.isnat
numpy.isneginf numpy.isneginf(x, out=None)[source] Test element-wise for negative infinity, return result as bool array. Parameters xarray_like The input array. outarray_like, optional A location into which the result is stored. If provided, it must have a shape that the input broadcasts to. If not provid...
numpy.reference.generated.numpy.isneginf
numpy.isposinf numpy.isposinf(x, out=None)[source] Test element-wise for positive infinity, return result as bool array. Parameters xarray_like The input array. outarray_like, optional A location into which the result is stored. If provided, it must have a shape that the input broadcasts to. If not provid...
numpy.reference.generated.numpy.isposinf
numpy.isreal numpy.isreal(x)[source] Returns a bool array, where True if input element is real. If element has complex type with zero complex part, the return value for that element is True. Parameters xarray_like Input array. Returns outndarray, bool Boolean array of same shape as x. See also i...
numpy.reference.generated.numpy.isreal
numpy.isrealobj numpy.isrealobj(x)[source] Return True if x is a not complex type or an array of complex numbers. The type of the input is checked, not the value. So even if the input has an imaginary part equal to zero, isrealobj evaluates to False if the data type is complex. Parameters xany The input can b...
numpy.reference.generated.numpy.isrealobj
numpy.isscalar numpy.isscalar(element)[source] Returns True if the type of element is a scalar type. Parameters elementany Input argument, can be of any type and shape. Returns valbool True if element is a scalar type, False if it is not. See also ndim Get the number of dimensions of an array ...
numpy.reference.generated.numpy.isscalar
numpy.issctype numpy.issctype(rep)[source] Determines whether the given object represents a scalar data-type. Parameters repany If rep is an instance of a scalar dtype, True is returned. If not, False is returned. Returns outbool Boolean result of check whether rep is a scalar dtype. See also i...
numpy.reference.generated.numpy.issctype
numpy.issubclass_ numpy.issubclass_(arg1, arg2)[source] Determine if a class is a subclass of a second class. issubclass_ is equivalent to the Python built-in issubclass, except that it returns False instead of raising a TypeError if one of the arguments is not a class. Parameters arg1class Input class. True ...
numpy.reference.generated.numpy.issubclass_
numpy.issubdtype numpy.issubdtype(arg1, arg2)[source] Returns True if first argument is a typecode lower/equal in type hierarchy. This is like the builtin issubclass, but for dtypes. Parameters arg1, arg2dtype_like dtype or object coercible to one Returns outbool See also Scalars Overview of the ...
numpy.reference.generated.numpy.issubdtype
numpy.issubsctype numpy.issubsctype(arg1, arg2)[source] Determine if the first argument is a subclass of the second argument. Parameters arg1, arg2dtype or dtype specifier Data-types. Returns outbool The result. See also issctype, issubdtype, obj2sctype Examples >>> np.issubsctype('S8', str)...
numpy.reference.generated.numpy.issubsctype
numpy.ix_ numpy.ix_(*args)[source] Construct an open mesh from multiple sequences. This function takes N 1-D sequences and returns N outputs with N dimensions each, such that the shape is 1 in all but one dimension and the dimension with the non-unit shape value cycles through all N dimensions. Using ix_ one can qu...
numpy.reference.generated.numpy.ix_
numpy.kaiser numpy.kaiser(M, beta)[source] Return the Kaiser window. The Kaiser window is a taper formed by using a Bessel function. Parameters Mint Number of points in the output window. If zero or less, an empty array is returned. betafloat Shape parameter for window. Returns outarray The window...
numpy.reference.generated.numpy.kaiser
numpy.kron numpy.kron(a, b)[source] Kronecker product of two arrays. Computes the Kronecker product, a composite array made of blocks of the second array scaled by the first. Parameters a, barray_like Returns outndarray See also outer The outer product Notes The function assumes that the number ...
numpy.reference.generated.numpy.kron
numpy.lcm numpy.lcm(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'lcm'> Returns the lowest common multiple of |x1| and |x2| Parameters x1, x2array_like, int Arrays of values. If x1.shape != x2.shape, they must be broadcastable to a c...
numpy.reference.generated.numpy.lcm
numpy.ldexp numpy.ldexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'ldexp'> Returns x1 * 2**x2, element-wise. The mantissas x1 and twos exponents x2 are used to construct floating point numbers x1 * 2**x2. Parameters x1array_like A...
numpy.reference.generated.numpy.ldexp
numpy.left_shift numpy.left_shift(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'left_shift'> Shift the bits of an integer to the left. Bits are shifted to the left by appending x2 0s at the right of x1. Since the internal representation of...
numpy.reference.generated.numpy.left_shift
numpy.less numpy.less(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'less'> Return the truth value of (x1 < x2) element-wise. Parameters x1, x2array_like Input arrays. If x1.shape != x2.shape, they must be broadcastable to a common sh...
numpy.reference.generated.numpy.less
numpy.less_equal numpy.less_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'less_equal'> Return the truth value of (x1 <= x2) element-wise. Parameters x1, x2array_like Input arrays. If x1.shape != x2.shape, they must be broadcast...
numpy.reference.generated.numpy.less_equal
numpy.lexsort numpy.lexsort(keys, axis=- 1) Perform an indirect stable sort using a sequence of keys. Given multiple sorting keys, which can be interpreted as columns in a spreadsheet, lexsort returns an array of integer indices that describes the sort order by multiple columns. The last key in the sequence is used...
numpy.reference.generated.numpy.lexsort
numpy.lib.arraysetops Set operations for arrays based on sorting. Notes For floating point arrays, inaccurate results may appear due to usual round-off and floating point comparison issues. Speed could be gained in some operations by an implementation of numpy.sort, that can provide directly the permutation vectors, t...
numpy.reference.generated.numpy.lib.arraysetops
numpy.lib.Arrayterator class numpy.lib.Arrayterator(var, buf_size=None)[source] Buffered iterator for big arrays. Arrayterator creates a buffered iterator for reading big arrays in small contiguous blocks. The class is useful for objects stored in the file system. It allows iteration over the object without reading...
numpy.reference.generated.numpy.lib.arrayterator
numpy.lib.mixins.NDArrayOperatorsMixin class numpy.lib.mixins.NDArrayOperatorsMixin[source] Mixin defining all operator special methods using __array_ufunc__. This class implements the special methods for almost all of Python’s builtin operators defined in the operator module, including comparisons (==, >, etc.) an...
numpy.reference.generated.numpy.lib.mixins.ndarrayoperatorsmixin
numpy.lib.NumpyVersion class numpy.lib.NumpyVersion(vstring)[source] Parse and compare numpy version strings. NumPy has the following versioning scheme (numbers given are examples; they can be > 9 in principle): Released version: ‘1.8.0’, ‘1.8.1’, etc. Alpha: ‘1.8.0a1’, ‘1.8.0a2’, etc. Beta: ‘1.8.0b1’, ‘1.8.0b2’, ...
numpy.reference.generated.numpy.lib.numpyversion
Structured arrays Introduction Structured arrays are ndarrays whose datatype is a composition of simpler datatypes organized as a sequence of named fields. For example, >>> x = np.array([('Rex', 9, 81.0), ('Fido', 3, 27.0)], ... dtype=[('name', 'U10'), ('age', 'i4'), ('weight', 'f4')]) >>> x array([('Rex'...
numpy.user.basics.rec
numpy.lib.recfunctions.apply_along_fields(func, arr)[source] Apply function ‘func’ as a reduction across fields of a structured array. This is similar to apply_along_axis, but treats the fields of a structured array as an extra axis. The fields are all first cast to a common type following the type-promotion rules fr...
numpy.user.basics.rec#numpy.lib.recfunctions.apply_along_fields
numpy.lib.recfunctions.assign_fields_by_name(dst, src, zero_unassigned=True)[source] Assigns values from one structured array to another by field name. Normally in numpy >= 1.14, assignment of one structured array to another copies fields “by position”, meaning that the first field from the src is copied to the first...
numpy.user.basics.rec#numpy.lib.recfunctions.assign_fields_by_name
numpy.lib.recfunctions.drop_fields(base, drop_names, usemask=True, asrecarray=False)[source] Return a new array with fields in drop_names dropped. Nested fields are supported. Changed in version 1.18.0: drop_fields returns an array with 0 fields if all fields are dropped, rather than returning None as it did previou...
numpy.user.basics.rec#numpy.lib.recfunctions.drop_fields
numpy.lib.recfunctions.find_duplicates(a, key=None, ignoremask=True, return_index=False)[source] Find the duplicates in a structured array along a given key Parameters aarray-like Input array key{string, None}, optional Name of the fields along which to check the duplicates. If None, the search is performed...
numpy.user.basics.rec#numpy.lib.recfunctions.find_duplicates
numpy.lib.recfunctions.flatten_descr(ndtype)[source] Flatten a structured data-type description. Examples >>> from numpy.lib import recfunctions as rfn >>> ndtype = np.dtype([('a', '<i4'), ('b', [('ba', '<f8'), ('bb', '<i4')])]) >>> rfn.flatten_descr(ndtype) (('a', dtype('int32')), ('ba', dtype('float64')), ('bb', dt...
numpy.user.basics.rec#numpy.lib.recfunctions.flatten_descr
numpy.lib.recfunctions.get_fieldstructure(adtype, lastname=None, parents=None)[source] Returns a dictionary with fields indexing lists of their parent fields. This function is used to simplify access to fields nested in other fields. Parameters adtypenp.dtype Input datatype lastnameoptional Last processed f...
numpy.user.basics.rec#numpy.lib.recfunctions.get_fieldstructure
numpy.lib.recfunctions.get_names(adtype)[source] Returns the field names of the input datatype as a tuple. Parameters adtypedtype Input datatype Examples >>> from numpy.lib import recfunctions as rfn >>> rfn.get_names(np.empty((1,), dtype=int)) Traceback (most recent call last): ... AttributeError: 'num...
numpy.user.basics.rec#numpy.lib.recfunctions.get_names
numpy.lib.recfunctions.get_names_flat(adtype)[source] Returns the field names of the input datatype as a tuple. Nested structure are flattened beforehand. Parameters adtypedtype Input datatype Examples >>> from numpy.lib import recfunctions as rfn >>> rfn.get_names_flat(np.empty((1,), dtype=int)) is None Tr...
numpy.user.basics.rec#numpy.lib.recfunctions.get_names_flat
numpy.lib.recfunctions.join_by(key, r1, r2, jointype='inner', r1postfix='1', r2postfix='2', defaults=None, usemask=True, asrecarray=False)[source] Join arrays r1 and r2 on key key. The key should be either a string or a sequence of string corresponding to the fields used to join the array. An exception is raised if t...
numpy.user.basics.rec#numpy.lib.recfunctions.join_by
numpy.lib.recfunctions.merge_arrays(seqarrays, fill_value=- 1, flatten=False, usemask=False, asrecarray=False)[source] Merge arrays field by field. Parameters seqarrayssequence of ndarrays Sequence of arrays fill_value{float}, optional Filling value used to pad missing data on the shorter arrays. flatten{...
numpy.user.basics.rec#numpy.lib.recfunctions.merge_arrays
numpy.lib.recfunctions.rec_append_fields(base, names, data, dtypes=None)[source] Add new fields to an existing array. The names of the fields are given with the names arguments, the corresponding values with the data arguments. If a single field is appended, names, data and dtypes do not have to be lists but just val...
numpy.user.basics.rec#numpy.lib.recfunctions.rec_append_fields
numpy.lib.recfunctions.rec_drop_fields(base, drop_names)[source] Returns a new numpy.recarray with fields in drop_names dropped.
numpy.user.basics.rec#numpy.lib.recfunctions.rec_drop_fields
numpy.lib.recfunctions.rec_join(key, r1, r2, jointype='inner', r1postfix='1', r2postfix='2', defaults=None)[source] Join arrays r1 and r2 on keys. Alternative to join_by, that always returns a np.recarray. See also join_by equivalent function
numpy.user.basics.rec#numpy.lib.recfunctions.rec_join
numpy.lib.recfunctions.recursive_fill_fields(input, output)[source] Fills fields from output with fields from input, with support for nested structures. Parameters inputndarray Input array. outputndarray Output array. Notes output should be at least the same size as input Examples >>> from numpy.lib...
numpy.user.basics.rec#numpy.lib.recfunctions.recursive_fill_fields
numpy.lib.recfunctions.rename_fields(base, namemapper)[source] Rename the fields from a flexible-datatype ndarray or recarray. Nested fields are supported. Parameters basendarray Input array whose fields must be modified. namemapperdictionary Dictionary mapping old field names to their new version. Exam...
numpy.user.basics.rec#numpy.lib.recfunctions.rename_fields
numpy.lib.recfunctions.repack_fields(a, align=False, recurse=False)[source] Re-pack the fields of a structured array or dtype in memory. The memory layout of structured datatypes allows fields at arbitrary byte offsets. This means the fields can be separated by padding bytes, their offsets can be non-monotonically in...
numpy.user.basics.rec#numpy.lib.recfunctions.repack_fields
numpy.lib.recfunctions.require_fields(array, required_dtype)[source] Casts a structured array to a new dtype using assignment by field-name. This function assigns from the old to the new array by name, so the value of a field in the output array is the value of the field with the same name in the source array. This h...
numpy.user.basics.rec#numpy.lib.recfunctions.require_fields
numpy.lib.recfunctions.stack_arrays(arrays, defaults=None, usemask=True, asrecarray=False, autoconvert=False)[source] Superposes arrays fields by fields Parameters arraysarray or sequence Sequence of input arrays. defaultsdictionary, optional Dictionary mapping field names to the corresponding default value...
numpy.user.basics.rec#numpy.lib.recfunctions.stack_arrays
numpy.lib.recfunctions.structured_to_unstructured(arr, dtype=None, copy=False, casting='unsafe')[source] Converts an n-D structured array into an (n+1)-D unstructured array. The new array will have a new last dimension equal in size to the number of field-elements of the input array. If not supplied, the output datat...
numpy.user.basics.rec#numpy.lib.recfunctions.structured_to_unstructured
numpy.lib.recfunctions.unstructured_to_structured(arr, dtype=None, names=None, align=False, copy=False, casting='unsafe')[source] Converts an n-D unstructured array into an (n-1)-D structured array. The last dimension of the input array is converted into a structure, with number of field-elements equal to the size of...
numpy.user.basics.rec#numpy.lib.recfunctions.unstructured_to_structured
numpy.lib.user_array.container class numpy.lib.user_array.container(data, dtype=None, copy=True)[source] Standard container-class for easy multiple-inheritance. Methods copy tostring byteswap astype
numpy.reference.generated.numpy.lib.user_array.container
numpy.linspace numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)[source] Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [start, stop]. The endpoint of the interval can optionally be excluded. Changed in ver...
numpy.reference.generated.numpy.linspace
numpy.load numpy.load(file, mmap_mode=None, allow_pickle=False, fix_imports=True, encoding='ASCII')[source] Load arrays or pickled objects from .npy, .npz or pickled files. Warning Loading files that contain object arrays uses the pickle module, which is not secure against erroneous or maliciously constructed data...
numpy.reference.generated.numpy.load
numpy.loadtxt numpy.loadtxt(fname, dtype=<class 'float'>, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, ndmin=0, encoding='bytes', max_rows=None, *, like=None)[source] Load data from a text file. Each row in the text file must have the same number of values. Parameters f...
numpy.reference.generated.numpy.loadtxt
numpy.log numpy.log(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'log'> Natural logarithm, element-wise. The natural logarithm log is the inverse of the exponential function, so that log(exp(x)) = x. The natural logarithm is logarithm in base e...
numpy.reference.generated.numpy.log
numpy.log10 numpy.log10(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'log10'> Return the base 10 logarithm of the input array, element-wise. Parameters xarray_like Input values. outndarray, None, or tuple of ndarray and None, optional ...
numpy.reference.generated.numpy.log10
numpy.log1p numpy.log1p(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'log1p'> Return the natural logarithm of one plus the input array, element-wise. Calculates log(1 + x). Parameters xarray_like Input values. outndarray, None, or tuple...
numpy.reference.generated.numpy.log1p
numpy.log2 numpy.log2(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'log2'> Base-2 logarithm of x. Parameters xarray_like Input values. outndarray, None, or tuple of ndarray and None, optional A location into which the result is stored...
numpy.reference.generated.numpy.log2
numpy.logaddexp numpy.logaddexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logaddexp'> Logarithm of the sum of exponentiations of the inputs. Calculates log(exp(x1) + exp(x2)). This function is useful in statistics where the calculated ...
numpy.reference.generated.numpy.logaddexp
numpy.logaddexp2 numpy.logaddexp2(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logaddexp2'> Logarithm of the sum of exponentiations of the inputs in base-2. Calculates log2(2**x1 + 2**x2). This function is useful in machine learning when ...
numpy.reference.generated.numpy.logaddexp2
numpy.logical_and numpy.logical_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_and'> Compute the truth value of x1 AND x2 element-wise. Parameters x1, x2array_like Input arrays. If x1.shape != x2.shape, they must be broadc...
numpy.reference.generated.numpy.logical_and
numpy.logical_not numpy.logical_not(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_not'> Compute the truth value of NOT x element-wise. Parameters xarray_like Logical NOT is applied to the elements of x. outndarray, None, or tupl...
numpy.reference.generated.numpy.logical_not
numpy.logical_or numpy.logical_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_or'> Compute the truth value of x1 OR x2 element-wise. Parameters x1, x2array_like Logical OR is applied to the elements of x1 and x2. If x1.shap...
numpy.reference.generated.numpy.logical_or
numpy.logical_xor numpy.logical_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_xor'> Compute the truth value of x1 XOR x2, element-wise. Parameters x1, x2array_like Logical XOR is applied to the elements of x1 and x2. If x...
numpy.reference.generated.numpy.logical_xor
numpy.logspace numpy.logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None, axis=0)[source] Return numbers spaced evenly on a log scale. In linear space, the sequence starts at base ** start (base to the power of start) and ends with base ** stop (see endpoint below). Changed in version 1.16.0: Non-sc...
numpy.reference.generated.numpy.logspace
numpy.longcomplex[source] alias of numpy.clongdouble
numpy.reference.arrays.scalars#numpy.longcomplex
class numpy.longdouble[source] Extended-precision floating-point number type, compatible with C long double but not necessarily with IEEE 754 quadruple-precision. Character code 'g' Alias numpy.longfloat Alias on this platform (Linux x86_64) numpy.float128: 128-bit extended-precision floating-point number type.
numpy.reference.arrays.scalars#numpy.longdouble
numpy.longfloat[source] alias of numpy.longdouble
numpy.reference.arrays.scalars#numpy.longfloat