[Numpy-discussion] Getting an array interface and using it

Pierre GM pgmdevlist@gmail....
Mon Nov 12 13:28:18 CST 2007

> > I think numpy.array(object) always makes a copy.
> >
> > You want numpy.asarray(object) which will make a view if object exposes
> > the array interface and matches the type and sizes requested.

FYI, numpy.asarray is a shortcut for numpy.array(copy=False), numpy.asanyarray 
for numpy.array(copy=False, subok=True)... In other terms, you can stick to 
array, as long as you provide the proper keywords.

More information about the Numpy-discussion mailing list