splinepy.utils.data.PhysicalSpaceArray#
- class splinepy.utils.data.PhysicalSpaceArray[source]#
Bases:
ndarray
numpy array object that keeps mirroring inplace changes to the source. Meant to help control_points.
Methods
PhysicalSpaceArray.all
([axis, out, ...])Returns True if all elements evaluate to True.
PhysicalSpaceArray.any
([axis, out, ...])Returns True if any of the elements of a evaluate to True.
PhysicalSpaceArray.argmax
([axis, out, keepdims])Return indices of the maximum values along the given axis.
PhysicalSpaceArray.argmin
([axis, out, keepdims])Return indices of the minimum values along the given axis.
PhysicalSpaceArray.argpartition
(kth[, axis, ...])Returns the indices that would partition this array.
PhysicalSpaceArray.argsort
([axis, kind, order])Returns the indices that would sort this array.
PhysicalSpaceArray.astype
(dtype[, order, ...])Copy of the array, cast to a specified type.
PhysicalSpaceArray.byteswap
([inplace])Swap the bytes of the array elements
PhysicalSpaceArray.choose
(choices[, out, mode])Use an index array to construct a new array from a set of choices.
PhysicalSpaceArray.clip
([min, max, out])Return an array whose values are limited to
[min, max]
.PhysicalSpaceArray.compress
(condition[, ...])Return selected slices of this array along given axis.
Complex-conjugate all elements.
Return the complex conjugate, element-wise.
PhysicalSpaceArray.copy
(*args, **kwargs)copy creates regular numpy array
PhysicalSpaceArray.cumprod
([axis, dtype, out])Return the cumulative product of the elements along the given axis.
PhysicalSpaceArray.cumsum
([axis, dtype, out])Return the cumulative sum of the elements along the given axis.
PhysicalSpaceArray.diagonal
([offset, axis1, ...])Return specified diagonals.
PhysicalSpaceArray.dump
(file)Dump a pickle of the array to the specified file.
Returns the pickle of the array as a string.
PhysicalSpaceArray.fill
(value)Fill the array with a scalar value.
PhysicalSpaceArray.flatten
([order])Return a copy of the array collapsed into one dimension.
Returns full_row_indices.
PhysicalSpaceArray.getfield
(dtype[, offset])Returns a field of the given array as a certain type.
PhysicalSpaceArray.item
(*args)Copy an element of an array to a standard Python scalar and return it.
PhysicalSpaceArray.max
([axis, out, ...])Return the maximum along a given axis.
PhysicalSpaceArray.mean
([axis, dtype, out, ...])Returns the average of the array elements along given axis.
PhysicalSpaceArray.min
([axis, out, ...])Return the minimum along a given axis.
Return the indices of the elements that are non-zero.
PhysicalSpaceArray.partition
(kth[, axis, ...])Partially sorts the elements in the array in such a way that the value of the element in k-th position is in the position it would be in a sorted array.
a.prod(axis=None, dtype=None, out=None, keepdims=False,
PhysicalSpaceArray.put
(indices, values[, mode])Set
a.flat[n] = values[n]
for all n in indices.PhysicalSpaceArray.ravel
([order])Return a flattened array.
PhysicalSpaceArray.repeat
(repeats[, axis])Repeat elements of an array.
PhysicalSpaceArray.reshape
(shape, /, *[, ...])Returns an array containing the same data with a new shape.
PhysicalSpaceArray.resize
(new_shape[, refcheck])Change shape and size of array in-place.
PhysicalSpaceArray.round
([decimals, out])Return a with each element rounded to the given number of decimals.
Returns row_indices.
PhysicalSpaceArray.searchsorted
(v[, side, ...])Find indices where elements of v should be inserted in a to maintain order.
PhysicalSpaceArray.setfield
(val, dtype[, offset])Put a value into a specified place in a field defined by a data-type.
PhysicalSpaceArray.setflags
([write, align, uic])Set array flags WRITEABLE, ALIGNED, WRITEBACKIFCOPY, respectively.
PhysicalSpaceArray.sort
([axis, kind, order])Sort an array in-place.
PhysicalSpaceArray.squeeze
([axis])Remove axes of length one from a.
PhysicalSpaceArray.std
([axis, dtype, out, ...])Returns the standard deviation of the array elements along given axis.
PhysicalSpaceArray.sum
([axis, dtype, out, ...])Return the sum of the array elements over the given axis.
PhysicalSpaceArray.swapaxes
(axis1, axis2)Return a view of the array with axis1 and axis2 interchanged.
PhysicalSpaceArray.take
(indices[, axis, ...])Return an array formed from the elements of a at the given indices.
PhysicalSpaceArray.tobytes
([order])Construct Python bytes containing the raw data bytes in the array.
PhysicalSpaceArray.tofile
(fid[, sep, format])Write array to a file as text or binary (default).
Return the array as an
a.ndim
-levels deep nested list of Python scalars.PhysicalSpaceArray.tostring
([order])A compatibility alias for ~ndarray.tobytes, with exactly the same behavior.
PhysicalSpaceArray.trace
([offset, axis1, ...])Return the sum along diagonals of the array.
PhysicalSpaceArray.transpose
(*axes)Returns a view of the array with axes transposed.
PhysicalSpaceArray.var
([axis, dtype, out, ...])Returns the variance of the array elements, along given axis.
PhysicalSpaceArray.view
(*args, **kwargs)Set writeable flags to False for the view.
Attributes