as_device_array#
- class brainpy.math.as_device_array(tensor, dtype=None)[source]#
Convert the input to a
jax.numpy.DeviceArray
.- Parameters:
tensor (array_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, ArrayType.
dtype (data-type, optional) – By default, the data-type is inferred from the input data.
- Returns:
out – Array interpretation of tensor. No copy is performed if the input is already an ndarray with matching dtype.
- Return type:
ArrayType