If a does not own its own data or references or views to it exist,
and the data memory must be changed.
PyPy only: will always raise if the data memory must be changed, since
there is no reliable way to determine if references or views to it
exist.

SystemError

If the order keyword argument is specified. This behaviour is a
bug in NumPy.

Only contiguous arrays (data elements consecutive in memory) can be
resized.

The purpose of the reference count check is to make sure you
do not use this array as a buffer for another Python object and then
reallocate the memory. However, reference counts can increase in
other ways so if you are sure that you have not shared the memory
for this array with another Python object, then you may safely set
refcheck to False.

Examples

Shrinking an array: array is flattened (in the order that the data are
stored in memory), resized, and reshaped: