Search
Search Results
Search finished, found 72 page(s) matching the search query.
- Array API
...tinialized memory will be allocated and flags can be non-zero to indicate a Fortran-style contiguous array. Use PyArray_FILLWBYTE to initialize the memory. If data is not NULL, then it is assumed to point to the memory to be used for the ar...
- Array creation
...by specifying how many dimensions and length along that dimension in a tuple or list. numpy.zeros will create an array filled with 0 values with the specified shape. The default dtype is float64: >>> import numpy as np >>> np.zeros((2, 3))...
- Array iterator API
...ialized to the reduction unit. Use NpyIter_GetOperandArray to get the object. Then, call NpyIter_Reset to allocate and fill the buffers with their initial values. NPY_ITER_COPY_IF_OVERLAP If any write operand has overlap with any read...
- How does the CPU dispatcher work?
...the required optimizations, the callback should receive the following arguments: // 1- The pending calls of @param CHK filled up with the required CPU features, // that need to be tested first in runtime before executing call belong to...
- How to extend NumPy
...data-type Python object into a PyArray_Descr* object. Remember to pass in the address of the C-variables that should be filled in. There are lots of examples of how to use PyArg_ParseTuple throughout the NumPy source code. The standard usag...
- Importing data with
genfromtxt
...converters={1: convert}) array([[ 1., -999., 3.], [ 4., 5., 6.]]) Using missing and filling values Some entries may be missing in the dataset we are trying to import. In a previous example, we used a con...
- Legacy random generation
...faults to None. If size is None, then a single value is generated and returned. If size is an integer, then a 1-D array filled with generated values is returned. If size is a tuple, then an array with that shape is filled and returned. Comp...
- Mersenne Twister (MT19937)
...tween 0 and 624 that indexes the current position within the main array. The input seed is processed by SeedSequence to fill the whole state. The first element is reset such that only its most significant bit is set. Parallel Features The p...
- Multithreaded generation
...core distributions (random, standard_normal, standard_exponential, and standard_gamma) all allow existing arrays to be filled using the out keyword argument. Existing arrays need to be contiguous and well-behaved (writable and aligned). Un...
- NumPy 1.10.0 Release Notes
...ng the monic polynomial. It is still possible to obtain higher precision results by passing in an array of object type, filled e.g. with Python ints. np.interp can now be used with periodic functions np.interp now has a new parameter peri...
- NumPy 1.12.0 Release Notes
...in reshape, take, and specifying reduce axis. FutureWarning to changed behavior np.full now returns an array of the fill-value’s dtype if no dtype is given, instead of defaulting to float. np.average will emit a warning if the argument...
- NumPy 1.17.0 Release Notes
...p error or 3.83. Improve performance of numpy.pad The performance of the function has been improved for most cases by filling in a preallocated array with the desired padded shape instead of using concatenation. numpy.interp handles inf...
- NumPy 1.18.0 Release Notes
...lso affects the C defined functions PyArray_FromString and PyArray_FromFile (gh-13605) Deprecate non-scalar arrays as fill values in ma.fill_value Setting a MaskedArray.fill_value to a non-scalar array is deprecated since the logic to bro...
- NumPy 1.20.0 Release Notes
...ray(array_like). If you wish to ensure that the old behaviour remains unchanged, please create an object array and then fill it explicitly, for example: arr = np.empty(3, dtype=object) arr[:] = [array_like1, array_like2, array_like3] This...
- NumPy 1.24 Release Notes
...aising an error since they will be mapped to the NumPy scalars in the future. (gh-22607) Compatibility notes array.fill(scalar) may behave slightly different numpy.ndarray.fill may in some cases behave slightly different now due to the...
- NumPy 1.25.0 Release Notes
...rap" will return different results when the padding size is larger than initial array. np.pad with mode=wrap now always fills the space with strict multiples of original data even if the padding size is larger than the initial array. (gh-22...
- NumPy 1.8.0 Release Notes
...alues were omitted from all computations. New functions full and full_like New convenience functions to create arrays filled with a specific value; complementary to the existing zeros and zeros_like functions. IO compatibility with larg...
- NumPy 1.9.0 Release Notes
...rted. ndarray.tofile exception type All tofile exceptions are now IOError, some were previously ValueError. Invalid fill value exceptions Two changes to numpy.ma.core._check_fill_value: When the fill value is a string and the array typ...
- NumPy 2.0.0 Release Notes
..._ufunc__ or rely on __array_wrap__ which is called with a context in all cases, although only after the result array is filled. In those code paths, __array_wrap__ will now be passed a base class, rather than a subclass array. (gh-25105)...
- NumPy benchmarks
...a newly created empty/zero array. One can force pagefaults to occur in the setup phase either by calling np.ones or arr.fill(value) after creating the array....
- NumPy C code explanations
...old array by calculating the new strides and memory offset. This view can then either be returned or, for assignments, filled using PyArray_CopyObject. Note that PyArray_CopyObject may also be called on temporary arrays in other branches t...
- NumPy quickstart
...le should be imported Basic operations Arithmetic operators on arrays apply elementwise. A new array is created and filled with the result. >>> a = np.array([20, 30, 40, 50]) >>> b = np.arange(4) >>> b array([0, 1, 2, 3]) >>> c = a - b...
- numpy.histogram_bin_edges
- numpy.i: a SWIG interface file for NumPy
...are typically used in situations where in C/C++, you would allocate a(n) array(s) on the heap, and call the function to fill the array(s) values. In Python, the arrays are allocated for you and returned as new array objects. Note that we s...
- numpy.matlib.randn
- numpy.ndarray
...tionalAny object that can be interpreted as a numpy data type. bufferobject exposing buffer interface, optionalUsed to fill the array with data. offsetint, optionalOffset of array data in buffer. stridestuple of ints, optionalStrides of...
- numpy.polynomial.chebyshev.chebdomain
- numpy.polynomial.chebyshev.chebone
- numpy.polynomial.chebyshev.chebx
- numpy.polynomial.chebyshev.chebzero
- numpy.polynomial.hermite.hermdomain
- numpy.polynomial.hermite.hermone
- numpy.polynomial.hermite.hermx
- numpy.polynomial.hermite.hermzero
- numpy.polynomial.hermite_e.hermedomain
- numpy.polynomial.hermite_e.hermeone
- numpy.polynomial.hermite_e.hermex
- numpy.polynomial.hermite_e.hermezero
- numpy.polynomial.laguerre.lagdomain
- numpy.polynomial.laguerre.lagone
- numpy.polynomial.laguerre.lagx
- numpy.polynomial.laguerre.lagzero
- numpy.polynomial.legendre.legdomain
- numpy.polynomial.legendre.legone
- numpy.polynomial.legendre.legx
- numpy.polynomial.legendre.legzero
- numpy.polynomial.polynomial.polydomain
- numpy.polynomial.polynomial.polyone
- numpy.polynomial.polynomial.polyx
- numpy.polynomial.polynomial.polyzero
- numpy.random.pareto
- numpy.random.randn
- numpy.random.RandomState.pareto
- numpy.random.RandomState.randn
- NumPy: the absolute basics for beginners
- Python types and C-structures
- Random
Generator
- Reading and writing files
- Releasing a version
- The
numpy.ma
module - Beyond the basics
- C API for random
- Extending
- Glossary
- Indexing on
ndarrays
- Scalars
- Structured arrays
- Subclassing ndarray
- The array interface protocol
- Universal functions (
ufunc
) - Using F2PY bindings in Python
- What’s new or different