class documentation

class TestAsArray: (source)

View In Hierarchy

Test expected behaviors of asarray.

Method test_dtype_identity Confirm the intended behavior for dtype kwarg.
def test_dtype_identity(self): (source)

Confirm the intended behavior for dtype kwarg.

The result of asarray() should have the dtype provided through the keyword argument, when used. This forces unique array handles to be produced for unique np.dtype objects, but (for equivalent dtypes), the underlying data (the base object) is shared with the original array object.

Ref https://github.com/numpy/numpy/issues/1468