aerosandbox.numpy.array ======================= .. py:module:: aerosandbox.numpy.array Functions --------- .. autoapisummary:: aerosandbox.numpy.array.array aerosandbox.numpy.array.concatenate aerosandbox.numpy.array.stack aerosandbox.numpy.array.hstack aerosandbox.numpy.array.vstack aerosandbox.numpy.array.dstack aerosandbox.numpy.array.length aerosandbox.numpy.array.diag aerosandbox.numpy.array.roll aerosandbox.numpy.array.max aerosandbox.numpy.array.min aerosandbox.numpy.array.reshape aerosandbox.numpy.array.ravel aerosandbox.numpy.array.tile aerosandbox.numpy.array.zeros_like aerosandbox.numpy.array.ones_like aerosandbox.numpy.array.empty_like aerosandbox.numpy.array.full_like aerosandbox.numpy.array.assert_equal_shape Module Contents --------------- .. py:function:: array(array_like, dtype=None) Initializes a new array. Creates a NumPy array if possible; if not, creates a CasADi array. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.array.html .. py:function:: concatenate(arrays, axis = 0) Join a sequence of arrays along an existing axis. Returns a NumPy array if possible; if not, returns a CasADi array. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html .. py:function:: stack(arrays, axis = 0) Join a sequence of arrays along a new axis. Returns a NumPy array if possible; if not, returns a CasADi array. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.stack.html .. py:function:: hstack(arrays) .. py:function:: vstack(arrays) .. py:function:: dstack(arrays) .. py:function:: length(array) Returns the length of an 1D-array-like object. An extension of len() with slightly different functionality. :param array: Returns: .. py:function:: diag(v, k=0) Extract a diagonal or construct a diagonal array. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.diag.html .. py:function:: roll(a, shift, axis = None) Roll array elements along a given axis. Elements that roll beyond the last position are re-introduced at the first. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.roll.html :param a: Input array. :type a: array_like :param shift: The number of places by which elements are shifted. If a tuple, then axis must be a tuple of the same size, and each of the given axes is shifted by the corresponding number. If an int while axis is a tuple of ints, then the same value is used for all given axes. :type shift: int or tuple of ints :param axis: Axis or axes along which elements are shifted. By default, the array is flattened before shifting, after which the original shape is restored. :type axis: int or tuple of ints, optional :returns: **res** -- Output array, with the same shape as a. :rtype: ndarray .. py:function:: max(a, axis=None) Return the maximum of an array or maximum along an axis. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.max.html .. py:function:: min(a, axis=None) Return the minimum of an array or minimum along an axis. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.min.html .. py:function:: reshape(a, newshape, order='C') Gives a new shape to an array without changing its data. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.reshape.html .. py:function:: ravel(a, order='C') Returns a contiguous flattened array. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.ravel.html .. py:function:: tile(A, reps) Construct an array by repeating A the number of times given by reps. See syntax here: https://numpy.org/doc/stable/reference/generated/numpy.tile.html .. py:function:: zeros_like(a, dtype=None, order='K', subok=True, shape=None) Return an array of zeros with the same shape and type as a given array. .. py:function:: ones_like(a, dtype=None, order='K', subok=True, shape=None) Return an array of ones with the same shape and type as a given array. .. py:function:: empty_like(prototype, dtype=None, order='K', subok=True, shape=None) Return a new array with the same shape and type as a given array. .. py:function:: full_like(a, fill_value, dtype=None, order='K', subok=True, shape=None) Return a full array with the same shape and type as a given array. .. py:function:: assert_equal_shape(arrays) Assert that all of the given arrays are the same shape. If this is not true, raise a ValueError. Args: arrays: The arrays to be evaluated. Can be provided as a: * List, in which case a generic ValueError is thrown * Dictionary consisting of name:array pairs for key:value, in which case the names are given in the ValueError. Returns: None. Throws an error if leng