numpy.sign()

numpy.sign(x[, out]) = Returns an element-wise indication of the sign of a number. The sign function returns -1 if x < 0, 0 if x==0, 1 if x > 0. nan is returned for nan inputs. For complex inputs, the sign function returns sign(x.real) + 0j if x.real != 0 else sign(x.imag) + 0j. complex(nan, 0) is returned for complex nan inputs. Parameters: x : array_like Input values. Returns: y : ndarray The sign of x. Notes There is more than one definition of sign in common use for compl

MaskedArray.ids()

MaskedArray.ids() [source] Return the addresses of the data and mask areas. Parameters: None Examples >>> x = np.ma.array([1, 2, 3], mask=[0, 1, 1]) >>> x.ids() (166670640, 166659832) If the array has no mask, the address of nomask is returned. This address is typically not close to the data in memory: >>> x = np.ma.array([1, 2, 3]) >>> x.ids() (166691080, 3083169284L)

numpy.dot()

numpy.dot(a, b, out=None) Dot product of two arrays. For 2-D arrays it is equivalent to matrix multiplication, and for 1-D arrays to inner product of vectors (without complex conjugation). For N dimensions it is a sum product over the last axis of a and the second-to-last of b: dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m]) Parameters: a : array_like First argument. b : array_like Second argument. out : ndarray, optional Output argument. This must have the exact kind that would be ret

numpy.testing.decorators.slow()

numpy.testing.decorators.slow(t) [source] Label a test as ?slow?. The exact definition of a slow test is obviously both subjective and hardware-dependent, but in general any individual test that requires more than a second or two should be labeled as slow (the whole suite consits of thousands of tests, so even a second is significant). Parameters: t : callable The test to label as slow. Returns: t : callable The decorated test t. Examples The numpy.testing module includes import dec

numpy.broadcast_to()

numpy.broadcast_to(array, shape, subok=False) [source] Broadcast an array to a new shape. Parameters: array : array_like The array to broadcast. shape : tuple The shape of the desired array. subok : bool, optional If True, then sub-classes will be passed-through, otherwise the returned array will be forced to be a base-class array (default). Returns: broadcast : array A readonly view on the original array with the given shape. It is typically not contiguous. Furthermore, more than

numpy.issctype()

numpy.issctype(rep) [source] Determines whether the given object represents a scalar data-type. Parameters: rep : any If rep is an instance of a scalar dtype, True is returned. If not, False is returned. Returns: out : bool Boolean result of check whether rep is a scalar dtype. See also issubsctype, issubdtype, obj2sctype, sctype2char Examples >>> np.issctype(np.int32) True >>> np.issctype(list) False >>> np.issctype(1.1) False Strings are also a scalar

numpy.core.defchararray.multiply()

numpy.core.defchararray.multiply(a, i) [source] Return (a * i), that is string multiple concatenation, element-wise. Values in i of less than 0 are treated as 0 (which yields an empty string). Parameters: a : array_like of str or unicode i : array_like of ints Returns: out : ndarray Output array of str or unicode, depending on input types

recarray.getfield()

recarray.getfield(dtype, offset=0) Returns a field of the given array as a certain type. A field is a view of the array data with a given data-type. The values in the view are determined by the given type and the offset into the current array in bytes. The offset needs to be such that the view dtype fits in the array dtype; for example an array of dtype complex128 has 16-byte elements. If taking a view with a 32-bit integer (4 bytes), the offset needs to be between 0 and 12 bytes. Parameter

chararray.strip()

chararray.strip(chars=None) [source] For each element in self, return a copy with the leading and trailing characters removed. See also char.strip

numpy.arctanh()

numpy.arctanh(x[, out]) = Inverse hyperbolic tangent element-wise. Parameters: x : array_like Input array. Returns: out : ndarray Array of the same shape as x. See also emath.arctanh Notes arctanh is a multivalued function: for each x there are infinitely many numbers z such that tanh(z) = x. The convention is to return the z whose imaginary part lies in [-pi/2, pi/2]. For real-valued input data types, arctanh always returns real output. For each value that cannot be expressed as