asanyarray<T extends SizedNativeType> function

VARP asanyarray<T extends SizedNativeType>(
  1. dynamic a, {
  2. String order = "K",
})

asanyarray(a, dtype=None, order=None) Convert the input to an array.

Parameters

a : var_like Input data, in any form that can be converted to an array. This includes lists, lists of tuples, tuples, tuples of tuples, tuples of lists and ndarrays. dtype : data-type, optional By default, the data-type is inferred from the input data. order : {'C', 'F', 'A', 'K'}, optional Compatible with numpy.

Returns

out : var Array interpretation of a. No copy is performed if the input is already an ndarray with matching dtype and order.

Examples

a = 1, 2 np.asanyarray(a) var(1, 2)

Implementation

VARP asanyarray<T extends ffi.SizedNativeType>(dynamic a, {String order = "K"}) {
  return array<T>(a, order: order);
}