Search
Search Results
Search finished, found 43 page(s) matching the search query.
- numpy.matrix.base
...numpy.matrix.base...
- numpy.matrix.base (Python attribute, in numpy.matrix.base)
- Array creation
...creating arrays as laid out in the Array creation routines. These functions can be split into roughly three categories, based on the dimension of the array they create: 1D arrays 2D arrays ndarrays 1 - 1D array creation functions The 1D...
- Array iterator API
...ode. Iteration example The best way to become familiar with the iterator is to look at its usage within the NumPy codebase itself. For example, here is a slightly tweaked version of the code for PyArray_CountNonzero, which counts the numb...
- Constants of the
numpy.ma
module..., mask=[[0, 1], [1, 0]]) >>> x.data matrix([[1, 2], [3, 4]]) The type of the data can be accessed through the baseclass attribute. ma.MaskedArray.mask Current mask. ma.MaskedArray.recordmask Get or set the mask of the arra...
- NumPy 1.10.0 Release Notes
...er of the axes, in which case the input array was returned. A view is now returned in all cases. nonzero now returns base ndarrays Previously, an inconsistency existed between 1-D inputs (returning a base ndarray) and higher dimensional...
- NumPy 1.11.0 Release Notes
...ors These operators are implemented with the remainder and floor_divide functions respectively. Those functions are now based around fmod and are computed together so as to be compatible with each other and with the Python versions for floa...
- NumPy 1.14.0 Release Notes
...calars unambiguously with control of rounding and padding. PyArray_ResolveWritebackIfCopy and PyArray_SetWritebackIfCopyBase, new C-API functions useful in achieving PyPy compatibility. Deprecations Using np.bool_ objects in place of in...
- NumPy 1.15.0 Release Notes
...ted. For testing, we have switched to pytest as a replacement for the no longer maintained nose framework. The old nose based interface remains for downstream projects who may still be using it. The Python versions supported by this release...
- NumPy 1.15.2 Release Notes
....x #11982: BUG: fix refcount leak in PyArray_AdaptFlexibleDType #11992: BUG: Ensure boolean indexing of subclasses sets base correctly....
- NumPy 1.16.0 Release Notes
...NaT comparisons now return False without a warning, finishing a deprecation cycle begun in NumPy 1.11. np.lib.function_base.unique was removed, finishing a deprecation cycle begun in NumPy 1.4. Use numpy.unique instead. multi-field indexin...
- NumPy 1.20.0 Release Notes
...For such a dtype the following behaviour is true: res = np.array(arr, dtype) res.dtype is not dtype res.dtype is dtype.base res.shape == arr.shape + dtype.shape But res is filled using the logic: res = np.empty(arr.shape + dtype.shape, d...
- NumPy 1.25.0 Release Notes
...s EOFError instead, in both cases. (gh-23105) np.pad with mode=wrap pads with strict multiples of original data Code based on earlier version of pad that uses mode="wrap" will return different results when the padding size is larger tha...
- NumPy 1.5.0 Release Notes
...the first NumPy release which is compatible with Python 3. Support for Python 3 and Python 2 is done from a single code base. Extensive notes on changes can be found at https://web.archive.org/web/20100814160313/http://projects.scipy.org/nu...
- NumPy 1.7.0 Release Notes
...oduces the string ‘test’, and now np.logical_and(np.array(3, ‘O’), np.array(‘test’, ‘O’)) produces ‘test’ as well. The .base attribute on ndarrays, which is used on views to ensure that the underlying array owning the memory is not dealloca...
- NumPy 1.8.0 Release Notes
...upports Python 2.6 -2.7 and 3.2 - 3.3. Highlights 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 wit...
- NumPy 1.9.0 Release Notes
...verflows the array type, TypeError is raised instead of OverflowError. Polynomial Classes no longer derived from PolyBase This may cause problems with folks who depended on the polynomial classes being derived from PolyBase. They are now...
- NumPy 2.0.0 Release Notes
...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) Deprecations np.compat has been deprecated, as Python 2 is no l...
- NumPy 2.1.0 Release Notes
...NumPy, the solution is to make sure you #include "numpy/ndarrayobject.h" before their header and import NumPy yourself based on including-the-c-api. (gh-26103) Many shims removed from npy_3kcompat.h Many of the old shims and helper func...
- NumPy 2.2.0 Release Notes
...improvements will be seen on Python 3.12 or newer. (gh-27119) OpenBLAS on x86_64 and i686 is built with fewer kernels. Based on benchmarking, there are 5 clusters of performance around these kernels: PRESCOTT NEHALEM SANDYBRIDGE HASWELL SK...
- NumPy for MATLAB users
...e other hand, the API for adding GUIs and creating full-fledged applications is more or less an afterthought. NumPy is based on Python, a general-purpose language. The advantage to NumPy is access to Python libraries including: SciPy, Mat...
- NumPy quickstart
...e data. The view method creates a new array object that looks at the same data. >>> c = a.view() >>> c is a False >>> c.base is a # c is a view of the data owned by a True >>> c.flags.owndata False >>> >>> c = c.reshape((2, 6))...
- numpy.array
...ubokbool, optionalIf True, then sub-classes will be passed-through, otherwise the returned array will be forced to be a base-class array (default). ndminint, optionalSpecifies the minimum number of dimensions that the resulting array shoul...
- numpy.char.chararray
...c', b'abc', b'abc'], [b'abc', b'abc', b'abc']], dtype='|S5') Attributes: TView of the transposed array. baseBase object if memory is from some other object. ctypesAn object to simplify the interaction of the array with the...
- numpy.einsum
...einsum_path function. See np.einsum_path for more details. Defaults to False. Returns: outputndarrayThe calculation based on the Einstein summation convention. See also einsum_path, dot, inner, outer, tensordot, linalg.multi_dot e...
- numpy.linalg.matrix_rank
...e threshold of S.max() * np.finfo(A.dtype).eps / 2. * np.sqrt(m + n + 1.). The authors describe this threshold as being based on “expected roundoff error” (p 71). The thresholds above deal with floating point roundoff error in the calculati...
- numpy.linalg.svd
...+ 1j*rng.normal(size=(9, 6)) >>> b = rng.normal(size=(2, 7, 8, 3)) + 1j*rng.normal(size=(2, 7, 8, 3)) Reconstruction based on full SVD, 2D case: >>> U, S, Vh = np.linalg.svd(a, full_matrices=True) >>> U.shape, S.shape, Vh.shape ((9, 9),...
- numpy.matrix
...e transpose of self. IReturns the (multiplicative) inverse of invertible self. TReturns the transpose of the matrix. baseBase object if memory is from some other object. ctypesAn object to simplify the interaction of the array with the...
- numpy.matrix.astype
...optionalIf True, then sub-classes will be passed-through (default), otherwise the returned array will be forced to be a base-class array. copybool, optionalBy default, astype always returns a newly allocated array. If this is set to false,...
- numpy.matrix.base
...numpy.matrix.base...
- numpy.matrix.ctypes
...+ b).ctypes.data_as(ctypes.c_void_p) _ctypes.shape (c_intp*self.ndim): A ctypes array of length self.ndim where the basetype is the C-integer corresponding to dtype('p') on this platform (see c_intp). This base-type could be ctypes.c_in...
- numpy.matrix.flags
...itten to. Setting this to False locks the data, making it read-only. A view (slice, etc.) inherits WRITEABLE from its base array at creation time, but a view of a writeable array may be subsequently locked while the base array remains wri...
- numpy.matrix.setflags
...s whether or not a is aligned properly for its type. uicbool, optionalDescribes whether or not a is a copy of another “base” array. Notes Array flags provide information about how the memory area used for the array is to be interpreted...
- numpy.recarray
...4012e-316, 0)], dtype=[('x', '<i4'), ('y', '<f8'), ('z', '<i4')]) Attributes: TView of the transposed array. baseBase object if memory is from some other object. ctypesAn object to simplify the interaction of the array with the...
- Standard array subclasses
...oal is to create an array with modified behavior, as do dask arrays for distributed computation and cupy arrays for GPU-based computation, subclassing is discouraged. Instead, using numpy’s dispatch mechanism is recommended. The ndarray ca...
- Testing the numpy.i typemaps
...t.TestCase: class VectorTestCase(unittest.TestCase): However, this class is not run directly. Rather, it serves as a base class to several other python classes, each one specific to a particular data type. The VectorTestCase class store...
- The N-dimensional array (
ndarray
) - Array API
..._intp PyArray_NBYTES(PyArrayObject *arr) Returns the total number of bytes consumed by the array. PyObject *PyArray_BASE(PyArrayObject *arr) This returns the base object of the array. In most cases, this means the object which owns the...
- Generalized universal function API
...alue -1 in the core_dim_sizes array. The function can replace the -1 with whatever value is appropriate for the ufunc, based on the core dimensions that occurred in the input arrays. Warning The function must never change a value in core_...
- Glossary
...[3, 4, 5]]) >>> a = np.arange(6).reshape(1,2,3) >>> a.ndim 3 >>> a array([[[0, 1, 2], [3, 4, 5]]]) .baseIf an array does not own its memory, then its base attribute returns the object whose memory the array is referencin...
- Troubleshooting
- Universal functions (
ufunc
) - Using Python as glue