O'Reilly logo

Learning SciPy for Numerical and Scientific Computing by Francisco J. Blanco-Silva

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Array routines

In this section we will deal with most operations with arrays. We will classify them in four main categories, as follows:

  • Routines for the creation of new arrays
  • Routines for the manipulation of a single array
  • Routines for the combination of two or more arrays
  • Routines to extract information from arrays

The reader will surely realize that some operations of this kind can be carried out by methods, which once again shows the flexibility of Python and NumPy.

Routines for array creation

We have seen the basic command that brings an array to memory and stores it to a variable – A=numpy.array([[1,2],[2,1]]). The complete syntax is as follows:

array(object=,dtype=None,copy=True,order=None,subox=False,ndim=0)

Let us go over the options; object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required