Search
Searching.
- numpy.reshape
...NumPy reference Routines and objects by topic Array manipulation routines numpy.reshape...
- numpy.char.chararray.reshape (Python method, in numpy.char.chararray.reshape)
- numpy.ma.masked_array.reshape (Python method, in numpy.ma.masked_array.reshape)
- numpy.ma.MaskedArray.reshape (Python method, in numpy.ma.MaskedArray.reshape)
- numpy.ma.MaskType.reshape (Python method, in numpy.ma.MaskType.reshape)
- numpy.ma.reshape (Python function, in numpy.ma.reshape)
- numpy.matrix.reshape (Python method, in numpy.matrix.reshape)
- numpy.memmap.reshape (Python method, in numpy.memmap.reshape)
- numpy.ndarray.reshape (Python method, in numpy.ndarray.reshape)
- numpy.recarray.reshape (Python method, in numpy.recarray.reshape)
- numpy.record.reshape (Python method, in numpy.record.reshape)
- numpy.reshape (Python function, in numpy.reshape)
- Constants of the
numpy.ma
module...ll_value, order]) Return the array data as a string containing the raw bytes in the array. Shape manipulation For reshape, resize, and transpose, the single tuple argument may be replaced with n integers which will be interpreted as a...
- NumPy 1.11.0 Release Notes
...ple ellipsis will raise IndexError, e.g., a[..., ...]. Non-integers used as index values will raise TypeError, e.g., in reshape, take, and specifying reduce axis. In a future release the following changes will be made. The rand function e...
- NumPy 1.12.0 Release Notes
...ith multiple ellipsis raises IndexError, e.g., a[..., ...]. Non-integers used as index values raise TypeError, e.g., in reshape, take, and specifying reduce axis. FutureWarning to changed behavior np.full now returns an array of the fil...
- NumPy 1.13.0 Release Notes
...). Calling expand_dims when the axis keyword does not satisfy -a.ndim - 1 <= axis <= a.ndim, where a is the array being reshaped, is deprecated. Future Changes Assignment between structured arrays with different field names will change...
- NumPy 1.17.0 Release Notes
...skedArray.mask now returns a view of the mask, not the mask itself Returning the mask itself was unsafe, as it could be reshaped in place which would violate expectations of the masked array code. The behavior of mask is now consistent with...
- NumPy 1.25.0 Release Notes
...now possible to perform inplace matrix multiplication via the @= operator. >>> import numpy as np >>> a = np.arange(6).reshape(3, 2) >>> print(a) [[0 1] [2 3] [4 5]] >>> b = np.ones((2, 2), dtype=int) >>> a @= b >>> print(a) [[1 1] [5...
- NumPy 1.8.0 Release Notes
...float indices and function arguments such as axes or shapes were truncated to integers without warning. For example arr.reshape(3., -1) or arr[0.] will trigger a deprecation warning in NumPy 1.8., and in some future version of NumPy they wi...
- NumPy 2.0.0 Release Notes
...construction is always np.take(unique, unique_inverse, axis=axis). When 2.0.0 needs to be supported, add unique_inverse.reshape(-1) to code. (gh-25553, gh-25570) any and all return booleans for object arrays The any and all functions and...
- NumPy 2.1.0 Release Notes
...so occur in code that releases the GIL; disabling the GIL only makes it easier to hit threading bugs. (gh-26157) numpy.reshape and numpy.ndarray.reshape now support shape and copy arguments. (gh-26292) NumPy now supports DLPack v1, suppor...
- NumPy for MATLAB users
...2). The absence of NumPy operator forms of logical_and and logical_or is an unfortunate consequence of Python’s design. RESHAPE and LINEAR INDEXING: MATLAB always allows multi-dimensional arrays to be accessed using scalar or linear indices...
- NumPy quickstart
...l access the elements in an array using indexing facilities. An example >>> import numpy as np >>> a = np.arange(15).reshape(3, 5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) >>> a.shape...
- numpy.add
...1 + x2 in terms of array broadcasting. Examples >>> import numpy as np >>> np.add(1.0, 4.0) 5.0 >>> x1 = np.arange(9.0).reshape((3, 3)) >>> x2 = np.arange(3.0) >>> np.add(x1, x2) array([[ 0., 2., 4.], [ 3., 5., 7.],...
- numpy.apply_over_axes
...axis arguments to ufuncs have been available since version 1.7.0. Examples >>> import numpy as np >>> a = np.arange(24).reshape(2,3,4) >>> a array([[[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]], [[12, 13, 14,...
- numpy.argmax
...s, the indices corresponding to the first occurrence are returned. Examples >>> import numpy as np >>> a = np.arange(6).reshape(2,3) + 10 >>> a array([[10, 11, 12], [13, 14, 15]]) >>> np.argmax(a) 5 >>> np.argmax(a, axis=0) array([1,...
- numpy.argmin
...s, the indices corresponding to the first occurrence are returned. Examples >>> import numpy as np >>> a = np.arange(6).reshape(2,3) + 10 >>> a array([[10, 11, 12], [13, 14, 15]]) >>> np.argmin(a) 0 >>> np.argmin(a, axis=0) array([0,...
- numpy.argwhere
...able for indexing arrays. For this purpose use nonzero(a) instead. Examples >>> import numpy as np >>> x = np.arange(6).reshape(2,3) >>> x array([[0, 1, 2], [3, 4, 5]]) >>> np.argwhere(x>1) array([[0, 2], [1, 0], [1, 1]...
- numpy.atleast_1d
...o atleast_2d, atleast_3d Examples >>> import numpy as np >>> np.atleast_1d(1.0) array([1.]) >>> x = np.arange(9.0).reshape(3,3) >>> np.atleast_1d(x) array([[0., 1., 2.], [3., 4., 5.], [6., 7., 8.]]) >>> np.atleast_1d(x) i...
- numpy.atleast_3d
...atleast_3d(3.0) array([[[3.]]]) >>> x = np.arange(3.0) >>> np.atleast_3d(x).shape (1, 3, 1) >>> x = np.arange(12.0).reshape(4,3) >>> np.atleast_3d(x).shape (4, 3, 1) >>> np.atleast_3d(x).base is x.base # x is a reshape, so not base its...
- numpy.average
...) >>> np.average(data) 2.5 >>> np.average(np.arange(1, 11), weights=np.arange(10, 0, -1)) 4.0 >>> data = np.arange(6).reshape((3, 2)) >>> data array([[0, 1], [2, 3], [4, 5]]) >>> np.average(data, axis=1, weights=[1./4, 3./4]...
- numpy.char.add
...1 + x2 in terms of array broadcasting. Examples >>> import numpy as np >>> np.add(1.0, 4.0) 5.0 >>> x1 = np.arange(9.0).reshape((3, 3)) >>> x2 = np.arange(3.0) >>> np.add(x1, x2) array([[ 0., 2., 4.], [ 3., 5., 7.],...
- numpy.char.chararray.flat
- numpy.char.chararray.mT
...y([[1, 2], [3, 4]]) >>> a array([[1, 2], [3, 4]]) >>> a.mT array([[1, 3], [2, 4]]) >>> a = np.arange(8).reshape((2, 2, 2)) >>> a array([[[0, 1], [2, 3]], [[4, 5], [6, 7]]]) >>> a.mT array([[[0, 2],...
- numpy.char.chararray.reshape
...Legacy fixed-width string functionality numpy.char.chararray numpy.char.chararray.reshape...
- numpy.char.chararray.resize
- numpy.char.chararray.shape
...e of array dimensions. The shape property is usually used to get the current shape of an array, but may also be used to reshape the array in-place by assigning a tuple of array dimensions to it. As with numpy.reshape, one of the new shape...
- numpy.char.chararray.strides
- numpy.char.chararray.transpose
...ermuted. See also transposeEquivalent function. ndarray.TArray property returning the array transposed. ndarray.reshapeGive a new shape to an array without changing its data. Examples >>> import numpy as np >>> a = np.array([[1,...
- numpy.char.chararray.view
...in calculations >>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)]) >>> xv = x.view(dtype=np.int8).reshape(-1,2) >>> xv array([[1, 2], [3, 4]], dtype=int8) >>> xv.mean(0) array([2., 3.]) Making changes to the...
- numpy.char.multiply
...gs.multiply(np.array(['a']), i) array(['a', 'aa', 'aaa'], dtype='<U3') >>> a = np.array(['a', 'b', 'c', 'd', 'e', 'f']).reshape((2, 3)) >>> np.strings.multiply(a, 3) array([['aaa', 'bbb', 'ccc'], ['ddd', 'eee', 'fff']], dtype='<U3')...
- numpy.choose
- numpy.diag
...riuUpper triangle of an array. trilLower triangle of an array. Examples >>> import numpy as np >>> x = np.arange(9).reshape((3,3)) >>> x array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) >>> np.diag(x) array([0, 4, 8]) >>> np.dia...
- numpy.diag_indices
- numpy.diag_indices_from
- numpy.diagonal
- numpy.divide
- numpy.dot
- numpy.dsplit
- numpy.dstack
- numpy.einsum
- numpy.expand_dims
- numpy.extract
- numpy.fft.fftshift
- numpy.fft.ifftshift
- numpy.flatiter
- numpy.flatiter.coords
- numpy.flatiter.copy
- numpy.flatiter.index
- numpy.flip
- numpy.fmod
- numpy.hsplit
- numpy.indices
- numpy.inner
- numpy.insert
- numpy.isin
- numpy.ix_
- numpy.kron
- numpy.lib.Arrayterator
- numpy.lib.Arrayterator.flat
- numpy.lib.stride_tricks.as_strided
- numpy.linalg.diagonal
- numpy.linalg.matmul
- numpy.linalg.matrix_norm
- numpy.linalg.norm
- numpy.linalg.tensordot
- numpy.linalg.trace
- numpy.linalg.vector_norm
- numpy.ma.apply_over_axes
- numpy.ma.argmax
- numpy.ma.array
- numpy.ma.asanyarray
- numpy.ma.asarray
- numpy.ma.atleast_1d
- numpy.ma.atleast_3d
- numpy.ma.average
- numpy.ma.compress_cols
- numpy.ma.compress_rowcols
- numpy.ma.compress_rows
- numpy.ma.count
- numpy.ma.count_masked
- numpy.ma.dstack
- numpy.ma.expand_dims
- numpy.ma.filled
- numpy.ma.fromflex
- numpy.ma.hsplit
- numpy.ma.indices
- numpy.ma.inner
- numpy.ma.innerproduct
- numpy.ma.masked_array.argmax
- numpy.ma.masked_array.count
- numpy.ma.masked_array.reshape
- numpy.ma.masked_array.shape
- numpy.ma.masked_array.strides
- numpy.ma.masked_array.transpose
- numpy.ma.MaskedArray.argmax
- numpy.ma.MaskedArray.count
- numpy.ma.MaskedArray.reshape
- numpy.ma.MaskedArray.shape
- numpy.ma.MaskedArray.strides
- numpy.ma.MaskedArray.transpose
- numpy.ma.MaskType.reshape
- numpy.ma.median
- numpy.ma.ndenumerate
- numpy.ma.notmasked_contiguous
- numpy.ma.notmasked_edges
- numpy.ma.ones_like
- numpy.ma.reshape
- numpy.ma.squeeze
- numpy.ma.transpose
- numpy.ma.vstack
- numpy.ma.where
- numpy.ma.zeros_like
- numpy.mask_indices
- numpy.matlib.repmat
- numpy.matmul
- numpy.matrix.A
- numpy.matrix.A1
- numpy.matrix.all
- numpy.matrix.argmax
- numpy.matrix.argmin
- numpy.matrix.flat