Use numpy.asarray as already dealing with array-like data.
Remove the copy kwarg as for NumPy 2.0 the default is None which makes a copy only if needed:
If None then the object is copied only if needed, i.e. if
array returns a copy, if obj is a nested sequence, or if a copy is
needed to satisfy any of the other requirements (dtype, order, etc.).
In NumPy 1.26 numpy.asarray, NumPy will try to avoid a copy if possible
No copy is performed if the input is already an ndarray with matching
dtype and order.
Resolves #22
Use NumPy 2.0 copy for arrays via asarray
Remove the copy kwarg as for NumPy 2.0 the default is None which makes a copy only if needed:
In NumPy 1.26 numpy.asarray, NumPy will try to avoid a copy if possible