array

ivy.array(object_in, dtype_str=None, dev_str=None, f=None)[source]

Creates an array.

Parameters
  • object_in (array) – An array_like object, which exposes the array interface, an object whose __array__ method returns an array, or any (nested) sequence.

  • dtype_str (data-type string, optional) – The desired data-type for the array in string format, i.e. ‘float32’ or ‘int64’. If not given, then the type will be determined as the minimum type required to hold the objects in the sequence.

  • dev_str (str) – device string on which to create the array ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc..

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

An array object satisfying the specified requirements, in the form of the selected framework.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty