Dopo l’esame del corso della prof Karlijn 🚀 e qualche scambio di opinioni con un paio di nerds che usano queste cose (non voglio dire che è colpa|merito loro, nèh!) credo che sia utile un aproccio a SciPy simile a quello adottato per NumPy (&co.). Purtroppo manca Jake 🚀.

Credo che la documentazione ufficiale faccia al mio caso. Proprio dall’introduzione ecco:

SciPy is a collection of mathematical algorithms and convenience functions built on the Numpy extension of Python. It adds significant power to the interactive Python session by providing the user with high-level commands and classes for manipulating and visualizing data. With SciPy an interactive Python session becomes a data-processing and system-prototyping environment rivaling systems such as MATLAB, IDL, Octave, R-Lab, and SciLab.

Due cose da notare secondo me: 1) non è che siano cose che si usano tutti i giorni, anzi solo quando servono, cioè raramente; e 2) c’è MATLAB, si usa quello perché si sta usando da tempo, ci sono le cose già fatte (cioè conosciute) e quello lo conoscono (usano?) tutti. Poi va benissimo (quasi sempre) la versione free Octave. Ne ho parlato in passato, non condivido quest’opinione ma la capisco. Anche perché (non voglio entrare nel dettaglio, sarebbe un discorso lungo) si può usare interattivamente in una GUI davvero funzionale.

E Python sarà anche sexy ma è comunque una cosa da apprendere e certe cose sono nuove 😯

In ogni caso questi posts non sono per nessun altro che per me, per cui parto 😊

Una nota fin da subito, l’usuale convenzione: For brevity and convenience, we will often assume that the main packages (** numpy**,

**, and**

`scipy`

**) have been imported as:**

`matplotlib`

`import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt`

**L’organizzazione di SciPy**

SciPy is organized into subpackages covering different scientific computing domains. These are summarized in the following table:

`Subpackage Description cluster Clustering algorithms constants Physical and mathematical constants fftpack Fast Fourier Transform routines integrate Integration and ordinary differential equation solvers interpolate Interpolation and smoothing splines io Input and Output linalg Linear algebra ndimage N-dimensional image processing odr Orthogonal distance regression optimize Optimization and root-finding routines signal Signal processing sparse Sparse matrices and associated routines spatial Spatial data structures and algorithms special Special functions stats Statistical distributions and functions`

Scipy sub-packages need to be imported separately, for example:

`from scipy import linalg, optimize`

Because of their ubiquitousness, some of the functions in these subpackages are also made available in the scipy namespace to ease their use in interactive sessions and programs. In addition, many basic array functions from ** numpy** are also available at the top-level of the scipy package. Before looking at the sub-packages individually, we will first look at some of these common functions.

**Trovare documentazione**

SciPy and NumPy have documentation versions in both HTML and PDF format available [here], that cover nearly all available functionality. However, this documentation is still work-in-progress and some parts may be incomplete or sparse. As we are a volunteer organization and depend on the community for growth, your participation – everything from providing feedback to improving the documentation and code – is welcome and actively encouraged.

Python’s documentation strings are used in SciPy for on-line documentation. There are two methods for reading them and getting help. One is Python’s command help in the pydoc module. Entering this command with no arguments (i.e. ** help**) launches an interactive help session that allows searching through the keywords and modules available to all of Python. Secondly, running the command help(obj) with an object as the argument displays that object’s calling signature, and documentation string.

The ** pydoc** method of

**is sophisticated but uses a pager to display the text. Sometimes this can interfere with the terminal you are running the interactive session within. A numpy/scipy-specific help system is also available under the command numpy.info. The signature and documentation string for the object passed to the help command are printed to standard output (or to a writeable object passed as the third argument). The second keyword argument of numpy.info defines the maximum width of the line for printing. If a module is passed as the argument to help then a list of the functions and classes defined in that module is printed. For example:**

`help`

**** no non sono riuscito a fare l’esempio ****ma c’è la reference guide; per

**è questa.**

`optimize`