numpy.core.defchararray.splitlines()

numpy.core.defchararray.splitlines(a, keepends=None) [source] For each element in a, return a list of the lines in the element, breaking at line boundaries. Calls str.splitlines element-wise. Parameters: a : array_like of str or unicode keepends : bool, optional Line breaks are not included in the resulting list unless keepends is given and true. Returns: out : ndarray Array of list objects See also str.splitlines

Laguerre.roots()

Laguerre.roots() [source] Return the roots of the series polynomial. Compute the roots for the series. Note that the accuracy of the roots decrease the further outside the domain they lie. Returns: roots : ndarray Array containing the roots of the series.

matrix.byteswap()

matrix.byteswap(inplace) Swap the bytes of the array elements Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Parameters: inplace : bool, optional If True, swap bytes in-place, default is False. Returns: out : ndarray The byteswapped array. If inplace is True, this is a view to self. Examples >>> A = np.array([1, 256, 8755], dtype=np.int16) >>> map(hex, A) ['0x1', '0x100', '0x2233'] >>

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