Search
Search Results
Search finished, found 40 page(s) matching the search query.
- Array creation
...ype(np.int32) >>> print('signed c:', c_signed32, c_signed32.dtype) signed c: [-3 -3 -3] int64 Notice when you perform operations with two arrays of the same dtype: uint32, the resulting array is the same type. When you perform operations...
- NumPy 1.10.0 Release Notes
...np.concatenate for joining along an existing axis. Addition of nanprod to the set of nanfunctions. Support for the ‘@’ operator in Python 3.5. Dropped Support The _dotblas module has been removed. CBLAS Support is now in Multiarray. Th...
- NumPy 1.11.0 Release Notes
...nce Numpy 1.9 but, due to a bug, sometimes no warning was raised and the dimensions were already preserved. % and // operators These operators are implemented with the remainder and floor_divide functions respectively. Those functions ar...
- NumPy 1.12.0 Release Notes
...bitrary but the following may be of particular interest or indicate areas likely to have future consequences. Order of operations in np.einsum can now be optimized for large speed improvements. New signature argument to np.vectorize for ve...
- NumPy 1.13.0 Release Notes
...NumPy 1.13.0 Release Notes This release supports Python 2.7 and 3.4 - 3.6. Highlights Operations like a + b + c will reuse temporaries on some platforms, resulting in less memory use and faster execution. I...
- NumPy 1.15.0 Release Notes
...atus_barrier and npy_clear_floatstatus_barrier have been added to deal with compiler optimization changing the order of operations. See below for details. Deprecations Aliases of builtin pickle functions are deprecated, in favor of the...
- NumPy 1.16.0 Release Notes
...ith OpenBLAS v0.3.4+, which should fix the known threading issues found in previous OpenBLAS versions. Downstream developers building this release should use Cython >= 0.29 and, if using OpenBLAS, OpenBLAS > v0.3.4. This release has seen a...
- NumPy 1.17.0 Release Notes
...ropped. Python 3.8b2 should work with the released source packages, but there are no future guarantees. Downstream developers should use Cython >= 0.29.11 for Python 3.8 support and OpenBLAS >= 3.7 (not currently out) to avoid problems on t...
- NumPy 1.3.0 Release Notes
...lines to the numpy code base. In current (specialized) ufuncs, the elementary function is limited to element-by-element operations, whereas the generalized version supports “sub-array” by “sub-array” operations. The Perl vector library PDL...
- NumPy 1.8.0 Release Notes
...hts New, no 2to3, Python 2 and Python 3 are supported by a common code base. New, gufuncs for linear algebra, enabling operations on stacked arrays. New, inplace fancy indexing for ufuncs with the .at method. New, partition function, parti...
- NumPy: the absolute basics for beginners
...imensional array data structures, such as the homogeneous, N-dimensional ndarray, and a large library of functions that operate efficiently on these data structures. Learn more about NumPy at What is NumPy, and if you have comments or sugge...
- The
numpy.ma
module...he mask as an index. The inverse of the mask can be calculated with the numpy.logical_not function or simply with the ~ operator: >>> import numpy as np >>> x = ma.array([[1, 2], [3, 4]], mask=[[0, 1], [1, 0]]) >>> x[~x.mask] masked_array(...
- Array API
...mely base is the array into which the current array will be copied upon copy resolution. This overloading of the base property for two functions is likely to change in a future version of NumPy. PyArray_Descr *PyArray_DESCR(PyArrayObjec...
- Beyond the basics
...ments to take advantage of speed enhancements available on micro- processors that use pipelining to enhance fundamental operations. The PyArray_IterAllButAxis ( array, &dim ) constructs an iterator object that is modified so that it will no...
- CPU build options
...Special options NONE: enable no features. NATIVE: Enables all CPU features that supported by the host CPU, this operation is based on the compiler flags (-march=native, -xHost, /QxHost) MIN: Enables the minimum CPU features that can...
- Generalized universal function API
...ralizing the universal functions (ufuncs). In regular ufuncs, the elementary function is limited to element-by-element operations, whereas the generalized version (gufuncs) supports “sub-array” by “sub-array” operations. The Perl vector l...
- Iterating over arrays
...der='C'): ... print(x, end=' ') ... 0 3 1 4 2 5 Modifying array values By default, the nditer treats the input operand as a read-only object. To be able to modify the array elements, you must specify either read-write or write-only...
- NumPy 1.13.1 Release Notes
...for the new memory overlap detection and temporary elision as well as reversion of the removal of the boolean binary - operator. Users of 1.13.0 should upgrade. Thr Python versions supported are 2.7 and 3.4 - 3.6. Note that the Python 3.6...
- NumPy 1.14.0 Release Notes
...n achieving PyPy compatibility. Deprecations Using np.bool_ objects in place of integers is deprecated. Previously operator.index(np.bool_) was legal and allowed constructs such as [1, 2, 3][np.True_]. That was misleading, as it behave...
- NumPy 2.0 migration guide
...ong type. The default integer is now equivalent to np.intp. Most end-users should not be affected by this change. Some operations will use more memory, but some operations may actually become faster. If you experience issues due to calling...
- NumPy 2.0.0 Release Notes
...s: A new variable-length string dtype, StringDType and a new numpy.strings namespace with performant ufuncs for string operations, Support for float32 and longdouble in all numpy.fft functions, Support for the array API standard in the mai...
- NumPy C code explanations
...NumPy user guide Under-the-hood documentation for developers NumPy C code explanations...
- NumPy for MATLAB users
...stored as 2D arrays of double precision floating point numbers, unless you specify the number of dimensions and type. Operations on the 2D instances of these arrays are modeled on matrix operations in linear algebra. In NumPy, the basic t...
- numpy.bitwise_and
...NumPy reference Routines and objects by topic Bit-wise operations numpy.bitwise_and...
- numpy.bitwise_invert
...NumPy reference Routines and objects by topic Bit-wise operations numpy.bitwise_invert...
- numpy.bitwise_left_shift
...NumPy reference Routines and objects by topic Bit-wise operations numpy.bitwise_left_shift...
- numpy.bitwise_or
...NumPy reference Routines and objects by topic Bit-wise operations numpy.bitwise_or...
- numpy.bitwise_right_shift
...NumPy reference Routines and objects by topic Bit-wise operations numpy.bitwise_right_shift...
- numpy.bitwise_xor
...NumPy reference Routines and objects by topic Bit-wise operations numpy.bitwise_xor...
- numpy.fromstring
...ary mode of this function. This mode interprets string as binary bytes, rather than ASCII text with decimal numbers, an operation which is better spelt frombuffer(string, dtype, count). If string contains unicode text, the binary mode of fr...
- numpy.invert
...NumPy reference Routines and objects by topic Bit-wise operations numpy.invert...
- numpy.left_shift
...NumPy reference Routines and objects by topic Bit-wise operations numpy.left_shift...
- numpy.memmap
...Python’s mmap module, which uses file-like objects. This subclass of ndarray has some unpleasant interactions with some operations, because it doesn’t quite fit properly as a subclass. An alternative to using this subclass is to create the...
- numpy.nan_to_num
...Input data. copybool, optionalWhether to create a copy of x (True) or to replace values in-place (False). The in-place operation only occurs if casting to an array does not require a copy. Default is True. nanint, float, optionalValue to...
- numpy.right_shift
...NumPy reference Routines and objects by topic Bit-wise operations numpy.right_shift...
- Python types and C-structures
...uffer interfaces. The rich comparison) is also used along with new-style attribute lookup for member (tp_members) and properties (tp_getset). The PyArray_Type can also be sub-typed. Tip The tp_as_number methods use a generic approach to ca...
- Scalars
...ms of an array partly on the same footing as arrays, smoothing out rough edges that result when mixing scalar and array operations. Array scalars live in a hierarchy (see the Figure below) of data types. They can be detected using the hiera...
- Standard array subclasses
...r, of why your subroutine may not be able to handle an arbitrary subclass of an array is that matrices redefine the “*” operator to be matrix-multiplication, rather than element-by-element multiplication. Special attributes and methods Se...
- Structured arrays
...dditional padding. If a structured dtype is created with align=True ensuring that dtype.isalignedstruct is true, this property is preserved: >>> dt = np.dtype("i1,V3,i4,V1", align=True)[["f0", "f2"]] >>> dt dtype({'names': ['f0', 'f2'], 'fo...
- Troubleshooting
...e following tips help you, please be sure to note the following: how you installed Python how you installed NumPy your operating system whether or not you have multiple versions of Python installed if you built from source, your compiler v...