mpi_array.globale_creation.array

mpi_array.globale_creation.array(a, dtype=None, copy=True, order='K', subok=False, ndmin=0, **kwargs)[source]

Create a mpi_array.globale.gndarray from an existing array-like object.

Parameters:
  • object (array_like) – An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence.
  • dtype (numpy.dtype) – The desired data-type for the array. If not given, then the type will be determined as the minimum type required to hold the objects in the sequence. This argument can only be used to upcast the array.
  • copy (bool) – If True, then the object is copied. Otherwise, a copy will only be made if __array__ returns a copy, if a is a nested sequence, or if a copy is needed to satisfy any of the other requirements (dtype, order, etc.).
  • order ('K', 'A', 'C', 'F') – Only C implemented. Specify the memory layout of the array. If object is not an array, the newly created array will be in C order (row major)
  • subok (bool) – If True, then sub-classes will be passed-through, otherwise the returned array will be forced to be a base-class array.
  • ndmin (int) – Specifies the minimum number of dimensions that the resulting array should have. Ones will be pre-pended to the shape as needed to meet this requirement.
Return type:

mpi_array.globale.gndarray

Returns:

An array object satisfying the specified requirements.