doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
numpy.random.RandomState.triangular method random.RandomState.triangular(left, mode, right, size=None)
Draw samples from the triangular distribution over the interval [left, right]. The triangular distribution is a continuous probability distribution with lower limit left, peak at mode, and upper limit right. Unlik... | numpy.reference.random.generated.numpy.random.randomstate.triangular |
numpy.random.RandomState.uniform method random.RandomState.uniform(low=0.0, high=1.0, size=None)
Draw samples from a uniform distribution. Samples are uniformly distributed over the half-open interval [low, high) (includes low, but excludes high). In other words, any value within the given interval is equally likel... | numpy.reference.random.generated.numpy.random.randomstate.uniform |
numpy.random.RandomState.vonmises method random.RandomState.vonmises(mu, kappa, size=None)
Draw samples from a von Mises distribution. Samples are drawn from a von Mises distribution with specified mode (mu) and dispersion (kappa), on the interval [-pi, pi]. The von Mises distribution (also known as the circular no... | numpy.reference.random.generated.numpy.random.randomstate.vonmises |
numpy.random.RandomState.wald method random.RandomState.wald(mean, scale, size=None)
Draw samples from a Wald, or inverse Gaussian, distribution. As the scale approaches infinity, the distribution becomes more like a Gaussian. Some references claim that the Wald is an inverse Gaussian with mean equal to 1, but this... | numpy.reference.random.generated.numpy.random.randomstate.wald |
numpy.random.RandomState.weibull method random.RandomState.weibull(a, size=None)
Draw samples from a Weibull distribution. Draw samples from a 1-parameter Weibull distribution with the given shape parameter a. \[X = (-ln(U))^{1/a}\] Here, U is drawn from the uniform distribution over (0,1]. The more common 2-param... | numpy.reference.random.generated.numpy.random.randomstate.weibull |
numpy.random.RandomState.zipf method random.RandomState.zipf(a, size=None)
Draw samples from a Zipf distribution. Samples are drawn from a Zipf distribution with specified parameter a > 1. The Zipf distribution (also known as the zeta distribution) is a discrete probability distribution that satisfies Zipf’s law: t... | numpy.reference.random.generated.numpy.random.randomstate.zipf |
numpy.random.ranf random.ranf()
This is an alias of random_sample. See random_sample for the complete documentation. | numpy.reference.random.generated.numpy.random.ranf |
numpy.random.rayleigh random.rayleigh(scale=1.0, size=None)
Draw samples from a Rayleigh distribution. The \(\chi\) and Weibull distributions are generalizations of the Rayleigh. Note New code should use the rayleigh method of a default_rng() instance instead; please see the Quick Start. Parameters
scalefloat... | numpy.reference.random.generated.numpy.random.rayleigh |
numpy.random.sample random.sample()
This is an alias of random_sample. See random_sample for the complete documentation. | numpy.reference.random.generated.numpy.random.sample |
numpy.random.seed random.seed(self, seed=None)
Reseed a legacy MT19937 BitGenerator Notes This is a convenience, legacy function. The best practice is to not reseed a BitGenerator, rather to recreate a new one. This method is here for legacy reasons. This example demonstrates best practice. >>> from numpy.random im... | numpy.reference.random.generated.numpy.random.seed |
numpy.random.SeedSequence.entropy attribute random.SeedSequence.entropy | numpy.reference.random.bit_generators.generated.numpy.random.seedsequence.entropy |
numpy.random.SeedSequence.generate_state method random.SeedSequence.generate_state(n_words, dtype=np.uint32)
Return the requested number of words for PRNG seeding. A BitGenerator should call this method in its constructor with an appropriate n_words parameter to properly seed itself. Parameters
n_wordsint
dty... | numpy.reference.random.bit_generators.generated.numpy.random.seedsequence.generate_state |
numpy.random.SeedSequence.spawn method random.SeedSequence.spawn(n_children)
Spawn a number of child SeedSequence s by extending the spawn_key. Parameters
n_childrenint
Returns
seqslist of SeedSequence s | numpy.reference.random.bit_generators.generated.numpy.random.seedsequence.spawn |
numpy.random.SeedSequence.spawn_key attribute random.SeedSequence.spawn_key | numpy.reference.random.bit_generators.generated.numpy.random.seedsequence.spawn_key |
numpy.random.set_state random.set_state(state)
Set the internal state of the generator from a tuple. For use if one has reason to manually (re-)set the internal state of the bit generator used by the RandomState instance. By default, RandomState uses the “Mersenne Twister”[1] pseudo-random number generating algorit... | numpy.reference.random.generated.numpy.random.set_state |
numpy.random.SFC64.cffi attribute random.SFC64.cffi
CFFI interface Returns
interfacenamedtuple
Named tuple containing CFFI wrapper state_address - Memory address of the state struct state - pointer to the state struct next_uint64 - function pointer to produce 64 bit integers next_uint32 - function pointer to... | numpy.reference.random.bit_generators.generated.numpy.random.sfc64.cffi |
numpy.random.SFC64.ctypes attribute random.SFC64.ctypes
ctypes interface Returns
interfacenamedtuple
Named tuple containing ctypes wrapper state_address - Memory address of the state struct state - pointer to the state struct next_uint64 - function pointer to produce 64 bit integers next_uint32 - function po... | numpy.reference.random.bit_generators.generated.numpy.random.sfc64.ctypes |
numpy.random.SFC64.state attribute random.SFC64.state
Get or set the PRNG state Returns
statedict
Dictionary containing the information required to describe the state of the PRNG | numpy.reference.random.bit_generators.generated.numpy.random.sfc64.state |
numpy.random.shuffle random.shuffle(x)
Modify a sequence in-place by shuffling its contents. This function only shuffles the array along the first axis of a multi-dimensional array. The order of sub-arrays is changed but their contents remains the same. Note New code should use the shuffle method of a default_rng(... | numpy.reference.random.generated.numpy.random.shuffle |
numpy.random.standard_cauchy random.standard_cauchy(size=None)
Draw samples from a standard Cauchy distribution with mode = 0. Also known as the Lorentz distribution. Note New code should use the standard_cauchy method of a default_rng() instance instead; please see the Quick Start. Parameters
sizeint or tupl... | numpy.reference.random.generated.numpy.random.standard_cauchy |
numpy.random.standard_exponential random.standard_exponential(size=None)
Draw samples from the standard exponential distribution. standard_exponential is identical to the exponential distribution with a scale parameter of 1. Note New code should use the standard_exponential method of a default_rng() instance inste... | numpy.reference.random.generated.numpy.random.standard_exponential |
numpy.random.standard_gamma random.standard_gamma(shape, size=None)
Draw samples from a standard Gamma distribution. Samples are drawn from a Gamma distribution with specified parameters, shape (sometimes designated “k”) and scale=1. Note New code should use the standard_gamma method of a default_rng() instance in... | numpy.reference.random.generated.numpy.random.standard_gamma |
numpy.random.standard_normal random.standard_normal(size=None)
Draw samples from a standard Normal distribution (mean=0, stdev=1). Note New code should use the standard_normal method of a default_rng() instance instead; please see the Quick Start. Parameters
sizeint or tuple of ints, optional
Output shape. ... | numpy.reference.random.generated.numpy.random.standard_normal |
numpy.random.standard_t random.standard_t(df, size=None)
Draw samples from a standard Student’s t distribution with df degrees of freedom. A special case of the hyperbolic distribution. As df gets large, the result resembles that of the standard normal distribution (standard_normal). Note New code should use the s... | numpy.reference.random.generated.numpy.random.standard_t |
numpy.random.triangular random.triangular(left, mode, right, size=None)
Draw samples from the triangular distribution over the interval [left, right]. The triangular distribution is a continuous probability distribution with lower limit left, peak at mode, and upper limit right. Unlike the other distributions, thes... | numpy.reference.random.generated.numpy.random.triangular |
numpy.random.uniform random.uniform(low=0.0, high=1.0, size=None)
Draw samples from a uniform distribution. Samples are uniformly distributed over the half-open interval [low, high) (includes low, but excludes high). In other words, any value within the given interval is equally likely to be drawn by uniform. Note... | numpy.reference.random.generated.numpy.random.uniform |
numpy.random.vonmises random.vonmises(mu, kappa, size=None)
Draw samples from a von Mises distribution. Samples are drawn from a von Mises distribution with specified mode (mu) and dispersion (kappa), on the interval [-pi, pi]. The von Mises distribution (also known as the circular normal distribution) is a continu... | numpy.reference.random.generated.numpy.random.vonmises |
numpy.random.wald random.wald(mean, scale, size=None)
Draw samples from a Wald, or inverse Gaussian, distribution. As the scale approaches infinity, the distribution becomes more like a Gaussian. Some references claim that the Wald is an inverse Gaussian with mean equal to 1, but this is by no means universal. The ... | numpy.reference.random.generated.numpy.random.wald |
numpy.random.weibull random.weibull(a, size=None)
Draw samples from a Weibull distribution. Draw samples from a 1-parameter Weibull distribution with the given shape parameter a. \[X = (-ln(U))^{1/a}\] Here, U is drawn from the uniform distribution over (0,1]. The more common 2-parameter Weibull, including a scale... | numpy.reference.random.generated.numpy.random.weibull |
numpy.random.zipf random.zipf(a, size=None)
Draw samples from a Zipf distribution. Samples are drawn from a Zipf distribution with specified parameter a > 1. The Zipf distribution (also known as the zeta distribution) is a discrete probability distribution that satisfies Zipf’s law: the frequency of an item is inve... | numpy.reference.random.generated.numpy.random.zipf |
numpy.recarray.all method recarray.all(axis=None, out=None, keepdims=False, *, where=True)
Returns True if all elements evaluate to True. Refer to numpy.all for full documentation. See also numpy.all
equivalent function | numpy.reference.generated.numpy.recarray.all |
numpy.recarray.any method recarray.any(axis=None, out=None, keepdims=False, *, where=True)
Returns True if any of the elements of a evaluate to True. Refer to numpy.any for full documentation. See also numpy.any
equivalent function | numpy.reference.generated.numpy.recarray.any |
numpy.recarray.argmax method recarray.argmax(axis=None, out=None)
Return indices of the maximum values along the given axis. Refer to numpy.argmax for full documentation. See also numpy.argmax
equivalent function | numpy.reference.generated.numpy.recarray.argmax |
numpy.recarray.argmin method recarray.argmin(axis=None, out=None)
Return indices of the minimum values along the given axis. Refer to numpy.argmin for detailed documentation. See also numpy.argmin
equivalent function | numpy.reference.generated.numpy.recarray.argmin |
numpy.recarray.argpartition method recarray.argpartition(kth, axis=- 1, kind='introselect', order=None)
Returns the indices that would partition this array. Refer to numpy.argpartition for full documentation. New in version 1.8.0. See also numpy.argpartition
equivalent function | numpy.reference.generated.numpy.recarray.argpartition |
numpy.recarray.argsort method recarray.argsort(axis=- 1, kind=None, order=None)
Returns the indices that would sort this array. Refer to numpy.argsort for full documentation. See also numpy.argsort
equivalent function | numpy.reference.generated.numpy.recarray.argsort |
numpy.recarray.astype method recarray.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
Copy of the array, cast to a specified type. Parameters
dtypestr or dtype
Typecode or data-type to which the array is cast.
order{‘C’, ‘F’, ‘A’, ‘K’}, optional
Controls the memory layout order of the re... | numpy.reference.generated.numpy.recarray.astype |
numpy.recarray.base attribute recarray.base
Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4])
>>> x.base is None
True
Slicing creates a view, whose memory is shared with x: >>> y = x[2:]
>>> y.base is x
True | numpy.reference.generated.numpy.recarray.base |
numpy.recarray.byteswap method recarray.byteswap(inplace=False)
Swap the bytes of the array elements Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts of a complex number ar... | numpy.reference.generated.numpy.recarray.byteswap |
numpy.recarray.choose method recarray.choose(choices, out=None, mode='raise')
Use an index array to construct a new array from a set of choices. Refer to numpy.choose for full documentation. See also numpy.choose
equivalent function | numpy.reference.generated.numpy.recarray.choose |
numpy.recarray.clip method recarray.clip(min=None, max=None, out=None, **kwargs)
Return an array whose values are limited to [min, max]. One of max or min must be given. Refer to numpy.clip for full documentation. See also numpy.clip
equivalent function | numpy.reference.generated.numpy.recarray.clip |
numpy.recarray.compress method recarray.compress(condition, axis=None, out=None)
Return selected slices of this array along given axis. Refer to numpy.compress for full documentation. See also numpy.compress
equivalent function | numpy.reference.generated.numpy.recarray.compress |
numpy.recarray.conj method recarray.conj()
Complex-conjugate all elements. Refer to numpy.conjugate for full documentation. See also numpy.conjugate
equivalent function | numpy.reference.generated.numpy.recarray.conj |
numpy.recarray.conjugate method recarray.conjugate()
Return the complex conjugate, element-wise. Refer to numpy.conjugate for full documentation. See also numpy.conjugate
equivalent function | numpy.reference.generated.numpy.recarray.conjugate |
numpy.recarray.copy method recarray.copy(order='C')
Return a copy of the array. Parameters
order{‘C’, ‘F’, ‘A’, ‘K’}, optional
Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of a as closely as po... | numpy.reference.generated.numpy.recarray.copy |
numpy.recarray.ctypes attribute recarray.ctypes
An object to simplify the interaction of the array with the ctypes module. This attribute creates an object that makes it easier to use arrays when calling shared libraries with the ctypes module. The returned object has, among others, data, shape, and strides attribu... | numpy.reference.generated.numpy.recarray.ctypes |
numpy.recarray.cumprod method recarray.cumprod(axis=None, dtype=None, out=None)
Return the cumulative product of the elements along the given axis. Refer to numpy.cumprod for full documentation. See also numpy.cumprod
equivalent function | numpy.reference.generated.numpy.recarray.cumprod |
numpy.recarray.cumsum method recarray.cumsum(axis=None, dtype=None, out=None)
Return the cumulative sum of the elements along the given axis. Refer to numpy.cumsum for full documentation. See also numpy.cumsum
equivalent function | numpy.reference.generated.numpy.recarray.cumsum |
numpy.recarray.data attribute recarray.data
Python buffer object pointing to the start of the array’s data. | numpy.reference.generated.numpy.recarray.data |
numpy.recarray.diagonal method recarray.diagonal(offset=0, axis1=0, axis2=1)
Return specified diagonals. In NumPy 1.9 the returned array is a read-only view instead of a copy as in previous NumPy versions. In a future version the read-only restriction will be removed. Refer to numpy.diagonal for full documentation.... | numpy.reference.generated.numpy.recarray.diagonal |
numpy.recarray.dump method recarray.dump(file)
Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters
filestr or Path
A string naming the dump file. Changed in version 1.17.0: pathlib.Path objects are now accepted. | numpy.reference.generated.numpy.recarray.dump |
numpy.recarray.dumps method recarray.dumps()
Returns the pickle of the array as a string. pickle.loads will convert the string back to an array. Parameters
None | numpy.reference.generated.numpy.recarray.dumps |
numpy.recarray.fill method recarray.fill(value)
Fill the array with a scalar value. Parameters
valuescalar
All elements of a will be assigned this value. Examples >>> a = np.array([1, 2])
>>> a.fill(0)
>>> a
array([0, 0])
>>> a = np.empty(2)
>>> a.fill(1)
>>> a
array([1., 1.]) | numpy.reference.generated.numpy.recarray.fill |
numpy.recarray.flags attribute recarray.flags
Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access. Only the WR... | numpy.reference.generated.numpy.recarray.flags |
numpy.recarray.flat attribute recarray.flat
A 1-D iterator over the array. This is a numpy.flatiter instance, which acts similarly to, but is not a subclass of, Python’s built-in iterator object. See also flatten
Return a copy of the array collapsed into one dimension. flatiter
Examples >>> x = np.arange(1, 7... | numpy.reference.generated.numpy.recarray.flat |
numpy.recarray.flatten method recarray.flatten(order='C')
Return a copy of the array collapsed into one dimension. Parameters
order{‘C’, ‘F’, ‘A’, ‘K’}, optional
‘C’ means to flatten in row-major (C-style) order. ‘F’ means to flatten in column-major (Fortran- style) order. ‘A’ means to flatten in column-major... | numpy.reference.generated.numpy.recarray.flatten |
numpy.recarray.getfield method recarray.getfield(dtype, offset=0)
Returns a field of the given array as a certain type. A field is a view of the array data with a given data-type. The values in the view are determined by the given type and the offset into the current array in bytes. The offset needs to be such that... | numpy.reference.generated.numpy.recarray.getfield |
numpy.recarray.item method recarray.item(*args)
Copy an element of an array to a standard Python scalar and return it. Parameters
*argsArguments (variable number and type)
none: in this case, the method only works for arrays with one element (a.size == 1), which element is copied into a standard Python scala... | numpy.reference.generated.numpy.recarray.item |
numpy.recarray.itemset method recarray.itemset(*args)
Insert scalar into an array (scalar is cast to array’s dtype, if possible) There must be at least 1 argument, and define the last argument as item. Then, a.itemset(*args) is equivalent to but faster than a[args] = item. The item should be a scalar value and args... | numpy.reference.generated.numpy.recarray.itemset |
numpy.recarray.itemsize attribute recarray.itemsize
Length of one array element in bytes. Examples >>> x = np.array([1,2,3], dtype=np.float64)
>>> x.itemsize
8
>>> x = np.array([1,2,3], dtype=np.complex128)
>>> x.itemsize
16 | numpy.reference.generated.numpy.recarray.itemsize |
numpy.recarray.max method recarray.max(axis=None, out=None, keepdims=False, initial=<no value>, where=True)
Return the maximum along a given axis. Refer to numpy.amax for full documentation. See also numpy.amax
equivalent function | numpy.reference.generated.numpy.recarray.max |
numpy.recarray.mean method recarray.mean(axis=None, dtype=None, out=None, keepdims=False, *, where=True)
Returns the average of the array elements along given axis. Refer to numpy.mean for full documentation. See also numpy.mean
equivalent function | numpy.reference.generated.numpy.recarray.mean |
numpy.recarray.min method recarray.min(axis=None, out=None, keepdims=False, initial=<no value>, where=True)
Return the minimum along a given axis. Refer to numpy.amin for full documentation. See also numpy.amin
equivalent function | numpy.reference.generated.numpy.recarray.min |
numpy.recarray.nbytes attribute recarray.nbytes
Total bytes consumed by the elements of the array. Notes Does not include memory consumed by non-element attributes of the array object. Examples >>> x = np.zeros((3,5,2), dtype=np.complex128)
>>> x.nbytes
480
>>> np.prod(x.shape) * x.itemsize
480 | numpy.reference.generated.numpy.recarray.nbytes |
numpy.recarray.ndim attribute recarray.ndim
Number of array dimensions. Examples >>> x = np.array([1, 2, 3])
>>> x.ndim
1
>>> y = np.zeros((2, 3, 4))
>>> y.ndim
3 | numpy.reference.generated.numpy.recarray.ndim |
numpy.recarray.newbyteorder method recarray.newbyteorder(new_order='S', /)
Return the array with the same data viewed with a different byte order. Equivalent to: arr.view(arr.dtype.newbytorder(new_order))
Changes are also made in all fields and sub-arrays of the array data type. Parameters
new_orderstring, opt... | numpy.reference.generated.numpy.recarray.newbyteorder |
numpy.recarray.nonzero method recarray.nonzero()
Return the indices of the elements that are non-zero. Refer to numpy.nonzero for full documentation. See also numpy.nonzero
equivalent function | numpy.reference.generated.numpy.recarray.nonzero |
numpy.recarray.partition method recarray.partition(kth, axis=- 1, kind='introselect', order=None)
Rearranges the elements in the array in such a way that the value of the element in kth position is in the position it would be in a sorted array. All elements smaller than the kth element are moved before this element... | numpy.reference.generated.numpy.recarray.partition |
numpy.recarray.prod method recarray.prod(axis=None, dtype=None, out=None, keepdims=False, initial=1, where=True)
Return the product of the array elements over the given axis Refer to numpy.prod for full documentation. See also numpy.prod
equivalent function | numpy.reference.generated.numpy.recarray.prod |
numpy.recarray.ptp method recarray.ptp(axis=None, out=None, keepdims=False)
Peak to peak (maximum - minimum) value along a given axis. Refer to numpy.ptp for full documentation. See also numpy.ptp
equivalent function | numpy.reference.generated.numpy.recarray.ptp |
numpy.recarray.put method recarray.put(indices, values, mode='raise')
Set a.flat[n] = values[n] for all n in indices. Refer to numpy.put for full documentation. See also numpy.put
equivalent function | numpy.reference.generated.numpy.recarray.put |
numpy.recarray.ravel method recarray.ravel([order])
Return a flattened array. Refer to numpy.ravel for full documentation. See also numpy.ravel
equivalent function ndarray.flat
a flat iterator on the array. | numpy.reference.generated.numpy.recarray.ravel |
numpy.recarray.repeat method recarray.repeat(repeats, axis=None)
Repeat elements of an array. Refer to numpy.repeat for full documentation. See also numpy.repeat
equivalent function | numpy.reference.generated.numpy.recarray.repeat |
numpy.recarray.reshape method recarray.reshape(shape, order='C')
Returns an array containing the same data with a new shape. Refer to numpy.reshape for full documentation. See also numpy.reshape
equivalent function Notes Unlike the free function numpy.reshape, this method on ndarray allows the elements of the... | numpy.reference.generated.numpy.recarray.reshape |
numpy.recarray.resize method recarray.resize(new_shape, refcheck=True)
Change shape and size of array in-place. Parameters
new_shapetuple of ints, or n ints
Shape of resized array.
refcheckbool, optional
If False, reference count will not be checked. Default is True. Returns
None
Raises
ValueErro... | numpy.reference.generated.numpy.recarray.resize |
numpy.recarray.round method recarray.round(decimals=0, out=None)
Return a with each element rounded to the given number of decimals. Refer to numpy.around for full documentation. See also numpy.around
equivalent function | numpy.reference.generated.numpy.recarray.round |
numpy.recarray.searchsorted method recarray.searchsorted(v, side='left', sorter=None)
Find indices where elements of v should be inserted in a to maintain order. For full documentation, see numpy.searchsorted See also numpy.searchsorted
equivalent function | numpy.reference.generated.numpy.recarray.searchsorted |
numpy.recarray.setfield method recarray.setfield(val, dtype, offset=0)
Put a value into a specified place in a field defined by a data-type. Place val into a’s field defined by dtype and beginning offset bytes into the field. Parameters
valobject
Value to be placed in field.
dtypedtype object
Data-type of... | numpy.reference.generated.numpy.recarray.setfield |
numpy.recarray.setflags method recarray.setflags(write=None, align=None, uic=None)
Set array flags WRITEABLE, ALIGNED, (WRITEBACKIFCOPY and UPDATEIFCOPY), respectively. These Boolean-valued flags affect how numpy interprets the memory area used by a (see Notes below). The ALIGNED flag can only be set to True if the... | numpy.reference.generated.numpy.recarray.setflags |
numpy.recarray.size attribute recarray.size
Number of elements in the array. Equal to np.prod(a.shape), i.e., the product of the array’s dimensions. Notes a.size returns a standard arbitrary precision Python integer. This may not be the case with other methods of obtaining the same value (like the suggested np.prod... | numpy.reference.generated.numpy.recarray.size |
numpy.recarray.sort method recarray.sort(axis=- 1, kind=None, order=None)
Sort an array in-place. Refer to numpy.sort for full documentation. Parameters
axisint, optional
Axis along which to sort. Default is -1, which means sort along the last axis.
kind{‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’}, opti... | numpy.reference.generated.numpy.recarray.sort |
numpy.recarray.squeeze method recarray.squeeze(axis=None)
Remove axes of length one from a. Refer to numpy.squeeze for full documentation. See also numpy.squeeze
equivalent function | numpy.reference.generated.numpy.recarray.squeeze |
numpy.recarray.std method recarray.std(axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, where=True)
Returns the standard deviation of the array elements along given axis. Refer to numpy.std for full documentation. See also numpy.std
equivalent function | numpy.reference.generated.numpy.recarray.std |
numpy.recarray.strides attribute recarray.strides
Tuple of bytes to step in each dimension when traversing an array. The byte offset of element (i[0], i[1], ..., i[n]) in an array a is: offset = sum(np.array(i) * a.strides)
A more detailed explanation of strides can be found in the “ndarray.rst” file in the NumPy ... | numpy.reference.generated.numpy.recarray.strides |
numpy.recarray.sum method recarray.sum(axis=None, dtype=None, out=None, keepdims=False, initial=0, where=True)
Return the sum of the array elements over the given axis. Refer to numpy.sum for full documentation. See also numpy.sum
equivalent function | numpy.reference.generated.numpy.recarray.sum |
numpy.recarray.swapaxes method recarray.swapaxes(axis1, axis2)
Return a view of the array with axis1 and axis2 interchanged. Refer to numpy.swapaxes for full documentation. See also numpy.swapaxes
equivalent function | numpy.reference.generated.numpy.recarray.swapaxes |
numpy.recarray.T attribute recarray.T
The transposed array. Same as self.transpose(). See also transpose
Examples >>> x = np.array([[1.,2.],[3.,4.]])
>>> x
array([[ 1., 2.],
[ 3., 4.]])
>>> x.T
array([[ 1., 3.],
[ 2., 4.]])
>>> x = np.array([1.,2.,3.,4.])
>>> x
array([ 1., 2., 3., 4.])
>>> ... | numpy.reference.generated.numpy.recarray.t |
numpy.recarray.take method recarray.take(indices, axis=None, out=None, mode='raise')
Return an array formed from the elements of a at the given indices. Refer to numpy.take for full documentation. See also numpy.take
equivalent function | numpy.reference.generated.numpy.recarray.take |
numpy.recarray.tobytes method recarray.tobytes(order='C')
Construct Python bytes containing the raw data bytes in the array. Constructs Python bytes showing a copy of the raw contents of data memory. The bytes object is produced in C-order by default. This behavior is controlled by the order parameter. New in vers... | numpy.reference.generated.numpy.recarray.tobytes |
numpy.recarray.tofile method recarray.tofile(fid, sep='', format='%s')
Write array to a file as text or binary (default). Data is always written in ‘C’ order, independent of the order of a. The data produced by this method can be recovered using the function fromfile(). Parameters
fidfile or str or Path
An op... | numpy.reference.generated.numpy.recarray.tofile |
numpy.recarray.tolist method recarray.tolist()
Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item function. If a.ndim is 0, then since the depth of th... | numpy.reference.generated.numpy.recarray.tolist |
numpy.recarray.tostring method recarray.tostring(order='C')
A compatibility alias for tobytes, with exactly the same behavior. Despite its name, it returns bytes not strs. Deprecated since version 1.19.0. | numpy.reference.generated.numpy.recarray.tostring |
numpy.recarray.trace method recarray.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)
Return the sum along diagonals of the array. Refer to numpy.trace for full documentation. See also numpy.trace
equivalent function | numpy.reference.generated.numpy.recarray.trace |
numpy.recarray.transpose method recarray.transpose(*axes)
Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d(a).T achieves this, as... | numpy.reference.generated.numpy.recarray.transpose |
numpy.recarray.var method recarray.var(axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, where=True)
Returns the variance of the array elements, along given axis. Refer to numpy.var for full documentation. See also numpy.var
equivalent function | numpy.reference.generated.numpy.recarray.var |
numpy.recarray.view method recarray.view([dtype][, type])
New view of array with the same data. Note Passing None for dtype is different from omitting the parameter, since the former invokes dtype(None) which is an alias for dtype('float_'). Parameters
dtypedata-type or ndarray sub-class, optional
Data-type... | numpy.reference.generated.numpy.recarray.view |
numpy.record.all method record.all()
Scalar method identical to the corresponding array attribute. Please see ndarray.all. | numpy.reference.generated.numpy.record.all |
numpy.record.any method record.any()
Scalar method identical to the corresponding array attribute. Please see ndarray.any. | numpy.reference.generated.numpy.record.any |
numpy.record.argmax method record.argmax()
Scalar method identical to the corresponding array attribute. Please see ndarray.argmax. | numpy.reference.generated.numpy.record.argmax |
numpy.record.argmin method record.argmin()
Scalar method identical to the corresponding array attribute. Please see ndarray.argmin. | numpy.reference.generated.numpy.record.argmin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.