tf.keras.ops.array

Create a tensor.

x Input tensor.
dtype The desired data-type for the tensor.

A tensor.

Examples:

keras.ops.array([1, 2, 3])
array([1, 2, 3], dtype=int32)
keras.ops.array([1, 2, 3], dtype="float32")
array([1., 2., 3.], dtype=float32)