help func |
info(func) or help(func) or func? (in Ipython) |
get help on the function func |
which func |
see note HELP |
find out where func is defined |
type func |
source(func) or func?? (in Ipython) |
print source for func (if not a native function) |
a && b |
a and b |
short-circuiting logical AND operator (Python native operator); scalar arguments only |
a || b |
a or b |
short-circuiting logical OR operator (Python native operator); scalar arguments only |
1i, 1j, 1i, 1j |
1j |
complex numbers |
eps |
np.spacing(1) |
Distance between 1 and the nearest floating point number. |
ode45 |
scipy.integrate.ode(f).set_integrator(‘dopri5’) |
integrate an ODE with Runge-Kutta 4,5 |
ode15s |
scipy.integrate.ode(f).set_integrator(‘vode’, method=’bdf’, order=5) |
integrate an ODE with BDF method |
ndims(a) |
ndim(a) or a.ndim |
get the number of dimensions of an array |
numel(a) |
size(a) or a.size |
get the number of elements of an array |
size(a) |
shape(a) or a.shape |
get the ??size?? of the matrix |
size(a,n) |
a.shape[n-1] |
get the number of elements of the n-th dimension of array a. (Note that MATLAB? uses 1 based indexing while Python uses 0 based indexing, See note INDEXING) |