pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
710 stars 87 forks source link

Can't read anaconda-mode server response #124

Closed silgon closed 8 years ago

silgon commented 9 years ago

Hello again,

I'm having a problem since the last few days. Let's say I have a really simple code:

import numpy as np
np.

After some time processing for the autocompletion the next message is thrown:

error in process sentinel: Can't read anaconda-mode server response

And the I get a really long message from the buffer *anaconda-response*:

HTTP/1.1 200 OK
Server: BaseHTTP/0.3 Python/2.7.6
Date: Wed, 23 Sep 2015 12:23:39 GMT
Content-Length: 829431

{"jsonrpc": "2.0", "id": 1, "result": [{"full-name": "numeric.absolute", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/__init__.py", "name": "abs", "column": 33, "docstring": "absolute(x[, out])\n\nCalculate the absolute value element-wise.\n\nParameters\n----------\nx : array_like\n    Input array.\n\nReturns\n-------\nabsolute : ndarray\n    An ndarray containing the absolute value of\n    each element in `x`.  For complex input, ``a + ib``, the\n    absolute value is :math:`\\sqrt{ a^2 + b^2 }`.\n\nExamples\n--------\n>>> x = np.array([-1.2, 1.2])\n>>> np.absolute(x)\narray([ 1.2,  1.2])\n>>> np.absolute(1.2 + 1j)\n1.5620499351813308\n\nPlot the function over ``[-10, 10]``:\n\n>>> import matplotlib.pyplot as plt\n\n>>> x = np.linspace(start=-10, stop=10, num=101)\n>>> plt.plot(x, np.absolute(x))\n>>> plt.show()\n\nPlot the function over the complex plane:\n\n>>> xx = x + 1j * x[:, np.newaxis]\n>>> plt.imshow(np.abs(xx), extent=[-10, 10, -10, 10])\n>>> plt.show()", "line": 33, "description": "instance: numeric.absolute", "type": "instance", "module-name": "core"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "absolute", "column": null, "docstring": "absolute(x[, out])\n\nCalculate the absolute value element-wise.\n\nParameters\n----------\nx : array_like\n    Input array.\n\nReturns\n-------\nabsolute : ndarray\n    An ndarray containing the absolute value of\n    each element in `x`.  For complex input, ``a + ib``, the\n    absolute value is :math:`\\sqrt{ a^2 + b^2 }`.\n\nExamples\n--------\n>>> x = np.array([-1.2, 1.2])\n>>> np.absolute(x)\narray([ 1.2,  1.2])\n>>> np.absolute(1.2 + 1j)\n1.5620499351813308\n\nPlot the function over ``[-10, 10]``:\n\n>>> import matplotlib.pyplot as plt\n\n>>> x = np.linspace(start=-10, stop=10, num=101)\n>>> plt.plot(x, np.absolute(x))\n>>> plt.show()\n\nPlot the function over the complex plane:\n\n>>> xx = x + 1j * x[:, np.newaxis]\n>>> plt.imshow(np.abs(xx), extent=[-10, 10, -10, 10])\n>>> plt.show()", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "__future__.absolute_import", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py", "name": "absolute_import", "column": 33, "docstring": "_Feature(self, optionalRelease, mandatoryRelease, compiler_flag)\n\n", "line": 8, "description": "instance: __future__.absolute_import", "type": "instance", "module-name": "stride_tricks"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "add", "column": null, "docstring": "add(x1, x2[, out])\n\nAdd arguments element-wise.\n\nParameters\n----------\nx1, x2 : array_like\n    The arrays to be added.  If ``x1.shape != x2.shape``, they must be\n    broadcastable to a common shape (which may be the shape of one or\n    the other).\n\nReturns\n-------\nadd : ndarray or scalar\n    The sum of `x1` and `x2`, element-wise.  Returns a scalar if\n    both  `x1` and `x2` are scalars.\n\nNotes\n-----\nEquivalent to `x1` + `x2` in terms of array broadcasting.\n\nExamples\n--------\n>>> np.add(1.0, 4.0)\n5.0\n>>> x1 = np.arange(9.0).reshape((3, 3))\n>>> x2 = np.arange(3.0)\n>>> np.add(x1, x2)\narray([[  0.,   2.,   4.],\n       [  3.,   5.,   7.],\n       [  6.,   8.,  10.]])", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "_compiled_base.add_docstring", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "add_docstring", "column": 37, "docstring": "add_docstring(obj, docstring)\n\nAdd a docstring to a built-in obj if possible.\nIf the obj already has a docstring raise a RuntimeError\nIf this routine does not know how to add a docstring to the object\nraise a TypeError", "line": 26, "description": "function: _compiled_base.add_docstring", "type": "function", "module-name": "function_base"}, {"full-name": "function_base.add_newdoc", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "add_newdoc", "column": 4, "docstring": "add_newdoc(place, obj, doc)\n\nAdds documentation to obj which is in module place.\n\nIf doc is a string add it to obj as a docstring\n\nIf doc is a tuple, then the first element is interpreted as\n   an attribute of obj and the second as the docstring\n      (method, docstring)\n\nIf doc is a list, then each element of the list should be a\n   sequence of length two --> [(method1, docstring1),\n   (method2, docstring2), ...]\n\nThis routine never raises an error.\n\nThis routine cannot modify read-only docstrings, as appear\nin new-style classes or built-in functions. Because this\nroutine never raises an error the caller must check manually\nthat the docstrings were changed.\n   ", "line": 3251, "description": "function: function_base.add_newdoc", "type": "function", "module-name": "function_base"}, {"full-name": "_compiled_base.add_newdoc_ufunc", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "add_newdoc_ufunc", "column": 28, "docstring": "add_ufunc_docstring(ufunc, new_docstring)\n\nReplace the docstring for a ufunc with new_docstring.\nThis method will only work if the current docstring for\nthe ufunc is NULL. (At the C level, i.e. when ufunc->doc is NULL.)\n\nParameters\n----------\nufunc : numpy.ufunc\n    A ufunc whose current doc is NULL.\nnew_docstring : string\n    The new docstring for the ufunc.\n\nNotes\n-----\nThis method allocates memory for new_docstring on\nthe heap. Technically this creates a mempory leak, since this\nmemory will not be reclaimed until the end of the program\neven if the ufunc itself is removed. However this will only\nbe a problem if the user is repeatedly creating ufuncs with\nno documentation, adding documentation via add_newdoc_ufunc,\nand then throwing away the ufunc.", "line": 28, "description": "function: _compiled_base.add_newdoc_ufunc", "type": "function", "module-name": "function_base"}, {"full-name": "add_newdocs", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", "name": "add_newdocs", "column": 18, "docstring": "", "line": 170, "description": "module: add_newdocs", "type": "module", "module-name": "numpy"}, {"full-name": "fromnumeric.alen", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "alen", "column": 4, "docstring": "alen(a)\n\nReturn the length of the first dimension of the input array.\n\nParameters\n----------\na : array_like\n   Input array.\n\nReturns\n-------\nalen : int\n   Length of the first dimension of `a`.\n\nSee Also\n--------\nshape, size\n\nExamples\n--------\n>>> a = np.zeros((7,4,5))\n>>> a.shape[0]\n7\n>>> np.alen(a)\n7", "line": 2226, "description": "function: fromnumeric.alen", "type": "function", "module-name": "fromnumeric"}, {"full-name": "fromnumeric.all", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "all", "column": 4, "docstring": "all(a, axis=None, out=None, keepdims=False)\n\nTest whether all array elements along a given axis evaluate to True.\n\nParameters\n----------\na : array_like\n    Input array or object that can be converted to an array.\naxis : None or int or tuple of ints, optional\n    Axis or axes along which a logical AND reduction is performed.\n    The default (`axis` = `None`) is to perform a logical AND over all\n    the dimensions of the input array. `axis` may be negative, in\n    which case it counts from the last to the first axis.\n\n    .. versionadded:: 1.7.0\n\n    If this is a tuple of ints, a reduction is performed on multiple\n    axes, instead of a single axis or all the axes as before.\nout : ndarray, optional\n    Alternate output array in which to place the result.\n    It must have the same shape as the expected output and its\n    type is preserved (e.g., if ``dtype(out)`` is float, the result\n    will consist of 0.0's and 1.0's).  See `doc.ufuncs` (Section\n    \"Output arguments\") for more details.\nkeepdims : bool, optional\n    If this is set to True, the axes which are reduced are left\n    in the result as dimensions with size one. With this option,\n    the result will broadcast correctly against the original `arr`.\n\nReturns\n-------\nall : ndarray, bool\n    A new boolean or array is returned unless `out` is specified,\n    in which case a reference to `out` is returned.\n\nSee Also\n--------\nndarray.all : equivalent method\n\nany : Test whether any element along a given axis evaluates to True.\n\nNotes\n-----\nNot a Number (NaN), positive infinity and negative infinity\nevaluate to `True` because these are not equal to zero.\n\nExamples\n--------\n>>> np.all([[True,False],[True,True]])\nFalse\n\n>>> np.all([[True,False],[True,True]], axis=0)\narray([ True, False], dtype=bool)\n\n>>> np.all([-1, 4, 5])\nTrue\n\n>>> np.all([1.0, np.nan])\nTrue\n\n>>> o=np.array([False])\n>>> z=np.all([-1, 4, 5], out=o)\n>>> id(z), id(o), z                             # doctest: +SKIP\n(28293632, 28293632, array([ True], dtype=bool))", "line": 1852, "description": "function: fromnumeric.all", "type": "function", "module-name": "fromnumeric"}, {"full-name": "numeric.allclose", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "allclose", "column": 4, "docstring": "allclose(a, b, rtol=1.e-5, atol=1.e-8)\n\nReturns True if two arrays are element-wise equal within a tolerance.\n\nThe tolerance values are positive, typically very small numbers.  The\nrelative difference (`rtol` * abs(`b`)) and the absolute difference\n`atol` are added together to compare against the absolute difference\nbetween `a` and `b`.\n\nIf either array contains one or more NaNs, False is returned.\nInfs are treated as equal if they are in the same place and of the same\nsign in both arrays.\n\nParameters\n----------\na, b : array_like\n    Input arrays to compare.\nrtol : float\n    The relative tolerance parameter (see Notes).\natol : float\n    The absolute tolerance parameter (see Notes).\n\nReturns\n-------\nallclose : bool\n    Returns True if the two arrays are equal within the given\n    tolerance; False otherwise.\n\nSee Also\n--------\nisclose, all, any\n\nNotes\n-----\nIf the following equation is element-wise True, then allclose returns\nTrue.\n\n absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))\n\nThe above equation is not symmetric in `a` and `b`, so that\n`allclose(a, b)` might be different from `allclose(b, a)` in\nsome rare cases.\n\nExamples\n--------\n>>> np.allclose([1e10,1e-7], [1.00001e10,1e-8])\nFalse\n>>> np.allclose([1e10,1e-8], [1.00001e10,1e-9])\nTrue\n>>> np.allclose([1e10,1e-8], [1.0001e10,1e-9])\nFalse\n>>> np.allclose([1.0, np.nan], [1.0, np.nan])\nFalse", "line": 2156, "description": "function: numeric.allclose", "type": "function", "module-name": "numeric"}, {"full-name": "numeric", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "ALLOW_THREADS", "column": 0, "docstring": "", "line": 68, "description": "statement: ALLOW_THREADS = multiarray.ALLOW_THREADS", "type": "statement", "module-name": "numeric"}, {"full-name": "numpy.core.numeric.alltrue", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/index_tricks.py", "name": "alltrue", "column": 32, "docstring": "alltrue (a, axis=None, out=None, keepdims=False)\n\nCheck if all elements of input array are true.\n\nSee Also\n--------\nnumpy.all : Equivalent function; see for details.", "line": 8, "description": "function: numpy.core.numeric.alltrue", "type": "function", "module-name": "index_tricks"}, {"full-name": "numerictypes", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numerictypes.py", "name": "allTypes", "column": 0, "docstring": "", "line": 218, "description": "statement: allTypes = {}", "type": "statement", "module-name": "numerictypes"}, {"full-name": "numeric.alterdot", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "alterdot", "column": 8, "docstring": "alterdot()\n\n", "line": 1097, "description": "function: numeric.alterdot", "type": "function", "module-name": "numeric"}, {"full-name": "fromnumeric.amax", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "amax", "column": 4, "docstring": "amax(a, axis=None, out=None, keepdims=False)\n\nReturn the maximum of an array or maximum along an axis.\n\nParameters\n----------\na : array_like\n    Input data.\naxis : int, optional\n    Axis along which to operate.  By default, flattened input is used.\nout : ndarray, optional\n    Alternative output array in which to place the result.  Must\n    be of the same shape and buffer length as the expected output.\n    See `doc.ufuncs` (Section \"Output arguments\") for more details.\nkeepdims : bool, optional\n    If this is set to True, the axes which are reduced are left\n    in the result as dimensions with size one. With this option,\n    the result will broadcast correctly against the original `arr`.\n\nReturns\n-------\namax : ndarray or scalar\n    Maximum of `a`. If `axis` is None, the result is a scalar value.\n    If `axis` is given, the result is an array of dimension\n    ``a.ndim - 1``.\n\nSee Also\n--------\namin :\n    The minimum value of an array along a given axis, propagating any NaNs.\nnanmax :\n    The maximum value of an array along a given axis, ignoring any NaNs.\nmaximum :\n    Element-wise maximum of two arrays, propagating any NaNs.\nfmax :\n    Element-wise maximum of two arrays, ignoring any NaNs.\nargmax :\n    Return the indices of the maximum values.\n\nnanmin, minimum, fmin\n\nNotes\n-----\nNaN values are propagated, that is if at least one item is NaN, the\ncorresponding max value will be NaN as well. To ignore NaN values\n(MATLAB behavior), please use nanmax.\n\nDon't use `amax` for element-wise comparison of 2 arrays; when\n``a.shape[0]`` is 2, ``maximum(a[0], a[1])`` is faster than\n``amax(a, axis=0)``.\n\nExamples\n--------\n>>> a = np.arange(4).reshape((2,2))\n>>> a\narray([[0, 1],\n       [2, 3]])\n>>> np.amax(a)           # Maximum of the flattened array\n3\n>>> np.amax(a, axis=0)   # Maxima along the first axis\narray([2, 3])\n>>> np.amax(a, axis=1)   # Maxima along the second axis\narray([1, 3])\n\n>>> b = np.arange(5, dtype=np.float)\n>>> b[2] = np.NaN\n>>> np.amax(b)\nnan\n>>> np.nanmax(b)\n4.0", "line": 2058, "description": "function: fromnumeric.amax", "type": "function", "module-name": "fromnumeric"}, {"full-name": "fromnumeric.amin", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "amin", "column": 4, "docstring": "amin(a, axis=None, out=None, keepdims=False)\n\nReturn the minimum of an array or minimum along an axis.\n\nParameters\n----------\na : array_like\n    Input data.\naxis : int, optional\n    Axis along which to operate.  By default, flattened input is used.\nout : ndarray, optional\n    Alternative output array in which to place the result.  Must\n    be of the same shape and buffer length as the expected output.\n    See `doc.ufuncs` (Section \"Output arguments\") for more details.\nkeepdims : bool, optional\n    If this is set to True, the axes which are reduced are left\n    in the result as dimensions with size one. With this option,\n    the result will broadcast correctly against the original `arr`.\n\nReturns\n-------\namin : ndarray or scalar\n    Minimum of `a`. If `axis` is None, the result is a scalar value.\n    If `axis` is given, the result is an array of dimension\n    ``a.ndim - 1``.\n\nSee Also\n--------\namax :\n    The maximum value of an array along a given axis, propagating any NaNs.\nnanmin :\n    The minimum value of an array along a given axis, ignoring any NaNs.\nminimum :\n    Element-wise minimum of two arrays, propagating any NaNs.\nfmin :\n    Element-wise minimum of two arrays, ignoring any NaNs.\nargmin :\n    Return the indices of the minimum values.\n\nnanmax, maximum, fmax\n\nNotes\n-----\nNaN values are propagated, that is if at least one item is NaN, the\ncorresponding min value will be NaN as well. To ignore NaN values\n(MATLAB behavior), please use nanmin.\n\nDon't use `amin` for element-wise comparison of 2 arrays; when\n``a.shape[0]`` is 2, ``minimum(a[0], a[1])`` is faster than\n``amin(a, axis=0)``.\n\nExamples\n--------\n>>> a = np.arange(4).reshape((2,2))\n>>> a\narray([[0, 1],\n       [2, 3]])\n>>> np.amin(a)           # Minimum of the flattened array\n0\n>>> np.amin(a, axis=0)   # Minima along the first axis\narray([0, 1])\n>>> np.amin(a, axis=1)   # Minima along the second axis\narray([0, 2])\n\n>>> b = np.arange(5, dtype=np.float)\n>>> b[2] = np.NaN\n>>> np.amin(b)\nnan\n>>> np.nanmin(b)\n0.0", "line": 2142, "description": "function: fromnumeric.amin", "type": "function", "module-name": "fromnumeric"}, {"full-name": "function_base.angle", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "angle", "column": 4, "docstring": "angle(z, deg=0)\n\nReturn the angle of the complex argument.\n\nParameters\n----------\nz : array_like\n    A complex number or sequence of complex numbers.\ndeg : bool, optional\n    Return angle in degrees if True, radians if False (default).\n\nReturns\n-------\nangle : {ndarray, scalar}\n    The counterclockwise angle from the positive real axis on\n    the complex plane, with dtype as numpy.float64.\n\nSee Also\n--------\narctan2\nabsolute\n\n\n\nExamples\n--------\n>>> np.angle([1.0, 1.0j, 1+1j])               # in radians\narray([ 0.        ,  1.57079633,  0.78539816])\n>>> np.angle(1+1j, deg=True)                  # in degrees\n45.0", "line": 1194, "description": "function: function_base.angle", "type": "function", "module-name": "function_base"}, {"full-name": "numpy.core.fromnumeric.any", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/machar.py", "name": "any", "column": 35, "docstring": "any(a, axis=None, out=None, keepdims=False)\n\nTest whether any array element along a given axis evaluates to True.\n\nReturns single boolean unless `axis` is not ``None``\n\nParameters\n----------\na : array_like\n    Input array or object that can be converted to an array.\naxis : None or int or tuple of ints, optional\n    Axis or axes along which a logical OR reduction is performed.\n    The default (`axis` = `None`) is to perform a logical OR over all\n    the dimensions of the input array. `axis` may be negative, in\n    which case it counts from the last to the first axis.\n\n    .. versionadded:: 1.7.0\n\n    If this is a tuple of ints, a reduction is performed on multiple\n    axes, instead of a single axis or all the axes as before.\nout : ndarray, optional\n    Alternate output array in which to place the result.  It must have\n    the same shape as the expected output and its type is preserved\n    (e.g., if it is of type float, then it will remain so, returning\n    1.0 for True and 0.0 for False, regardless of the type of `a`).\n    See `doc.ufuncs` (Section \"Output arguments\") for details.\nkeepdims : bool, optional\n    If this is set to True, the axes which are reduced are left\n    in the result as dimensions with size one. With this option,\n    the result will broadcast correctly against the original `arr`.\n\nReturns\n-------\nany : bool or ndarray\n    A new boolean or `ndarray` is returned unless `out` is specified,\n    in which case a reference to `out` is returned.\n\nSee Also\n--------\nndarray.any : equivalent method\n\nall : Test whether all elements along a given axis evaluate to True.\n\nNotes\n-----\nNot a Number (NaN), positive infinity and negative infinity evaluate\nto `True` because these are not equal to zero.\n\nExamples\n--------\n>>> np.any([[True, False], [True, True]])\nTrue\n\n>>> np.any([[True, False], [False, False]], axis=0)\narray([ True, False], dtype=bool)\n\n>>> np.any([-1, 0, 5])\nTrue\n\n>>> np.any(np.nan)\nTrue\n\n>>> o=np.array([False])\n>>> z=np.any([-1, 4, 5], out=o)\n>>> z, o\n(array([ True], dtype=bool), array([ True], dtype=bool))\n>>> # Check now that z is a reference to o\n>>> z is o\nTrue\n>>> id(z), id(o) # identity of z and o              # doctest: +SKIP\n(191614240, 191614240)", "line": 12, "description": "function: numpy.core.fromnumeric.any", "type": "function", "module-name": "machar"}, {"full-name": "function_base.append", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "append", "column": 4, "docstring": "append(arr, values, axis=None)\n\nAppend values to the end of an array.\n\nParameters\n----------\narr : array_like\n    Values are appended to a copy of this array.\nvalues : array_like\n    These values are appended to a copy of `arr`.  It must be of the\n    correct shape (the same shape as `arr`, excluding `axis`).  If\n    `axis` is not specified, `values` can be any shape and will be\n    flattened before use.\naxis : int, optional\n    The axis along which `values` are appended.  If `axis` is not\n    given, both `arr` and `values` are flattened before use.\n\nReturns\n-------\nappend : ndarray\n    A copy of `arr` with `values` appended to `axis`.  Note that\n    `append` does not occur in-place: a new array is allocated and\n    filled.  If `axis` is None, `out` is a flattened array.\n\nSee Also\n--------\ninsert : Insert elements into an array.\ndelete : Delete elements from an array.\n\nExamples\n--------\n>>> np.append([1, 2, 3], [[4, 5, 6], [7, 8, 9]])\narray([1, 2, 3, 4, 5, 6, 7, 8, 9])\n\nWhen `axis` is specified, `values` must have the correct shape.\n\n>>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0)\narray([[1, 2, 3],\n       [4, 5, 6],\n       [7, 8, 9]])\n>>> np.append([[1, 2, 3], [4, 5, 6]], [7, 8, 9], axis=0)\nTraceback (most recent call last):\n...\nValueError: arrays must have same number of dimensions", "line": 3832, "description": "function: function_base.append", "type": "function", "module-name": "function_base"}, {"full-name": "shape_base.apply_along_axis", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", "name": "apply_along_axis", "column": 4, "docstring": "apply_along_axis(func1d, axis, arr, *args, **kwargs)\n\nApply a function to 1-D slices along the given axis.\n\nExecute `func1d(a, *args)` where `func1d` operates on 1-D arrays and `a`\nis a 1-D slice of `arr` along `axis`.\n\nParameters\n----------\nfunc1d : function\n    This function should accept 1-D arrays. It is applied to 1-D\n    slices of `arr` along the specified axis.\naxis : integer\n    Axis along which `arr` is sliced.\narr : ndarray\n    Input array.\nargs : any\n    Additional arguments to `func1d`.\nkwargs: any\n    Additional named arguments to `func1d`.\n\n    .. versionadded:: 1.9.0\n\n\nReturns\n-------\napply_along_axis : ndarray\n    The output array. The shape of `outarr` is identical to the shape of\n    `arr`, except along the `axis` dimension, where the length of `outarr`\n    is equal to the size of the return value of `func1d`.  If `func1d`\n    returns a scalar `outarr` will have one fewer dimensions than `arr`.\n\nSee Also\n--------\napply_over_axes : Apply a function repeatedly over multiple axes.\n\nExamples\n--------\n>>> def my_func(a):\n...     \"\"\"Average first and last element of a 1-D array\"\"\"\n...     return (a[0] + a[-1]) * 0.5\n>>> b = np.array([[1,2,3], [4,5,6], [7,8,9]])\n>>> np.apply_along_axis(my_func, 0, b)\narray([ 4.,  5.,  6.])\n>>> np.apply_along_axis(my_func, 1, b)\narray([ 2.,  5.,  8.])\n\nFor a function that doesn't return a scalar, the number of dimensions in\n`outarr` is the same as `arr`.\n\n>>> b = np.array([[8,1,7], [4,3,9], [5,2,6]])\n>>> np.apply_along_axis(sorted, 1, b)\narray([[1, 7, 8],\n       [3, 4, 9],\n       [2, 5, 6]])", "line": 20, "description": "function: shape_base.apply_along_axis", "type": "function", "module-name": "shape_base"}, {"full-name": "shape_base.apply_over_axes", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", "name": "apply_over_axes", "column": 4, "docstring": "apply_over_axes(func, a, axes)\n\nApply a function repeatedly over multiple axes.\n\n`func` is called as `res = func(a, axis)`, where `axis` is the first\nelement of `axes`.  The result `res` of the function call must have\neither the same dimensions as `a` or one less dimension.  If `res`\nhas one less dimension than `a`, a dimension is inserted before\n`axis`.  The call to `func` is then repeated for each axis in `axes`,\nwith `res` as the first argument.\n\nParameters\n----------\nfunc : function\n    This function must take two arguments, `func(a, axis)`.\na : array_like\n    Input array.\naxes : array_like\n    Axes over which `func` is applied; the elements must be integers.\n\nReturns\n-------\napply_over_axis : ndarray\n    The output array.  The number of dimensions is the same as `a`,\n    but the shape can be different.  This depends on whether `func`\n    changes the shape of its output with respect to its input.\n\nSee Also\n--------\napply_along_axis :\n    Apply a function to 1-D slices of an array along the given axis.\n\nNotes\n------\nThis function is equivalent to tuple axis arguments to reorderable ufuncs\nwith keepdims=True. Tuple axis arguments to ufuncs have been availabe since\nversion 1.7.0.\n\nExamples\n--------\n>>> a = np.arange(24).reshape(2,3,4)\n>>> a\narray([[[ 0,  1,  2,  3],\n        [ 4,  5,  6,  7],\n        [ 8,  9, 10, 11]],\n       [[12, 13, 14, 15],\n        [16, 17, 18, 19],\n        [20, 21, 22, 23]]])\n\nSum over axes 0 and 2. The result has same number of dimensions\nas the original array:\n\n>>> np.apply_over_axes(np.sum, a, [0,2])\narray([[[ 60],\n        [ 92],\n        [124]]])\n\nTuple axis arguments to ufuncs are equivalent:\n\n>>> np.sum(a, axis=(0,2), keepdims=True)\narray([[[ 60],\n        [ 92],\n        [124]]])", "line": 134, "description": "function: shape_base.apply_over_axes", "type": "function", "module-name": "shape_base"}, {"full-name": "numpy.core.numeric.arange", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/index_tricks.py", "name": "arange", "column": 50, "docstring": "arange([start,] stop[, step,], dtype=None)\n\nReturn evenly spaced values within a given interval.\n\nValues are generated within the half-open interval ``[start, stop)``\n(in other words, the interval including `start` but excluding `stop`).\nFor integer arguments the function is equivalent to the Python built-in\n`range <http://docs.python.org/lib/built-in-funcs.html>`_ function,\nbut returns an ndarray rather than a list.\n\nWhen using a non-integer step, such as 0.1, the results will often not\nbe consistent.  It is better to use ``linspace`` for these cases.\n\nParameters\n----------\nstart : number, optional\n    Start of interval.  The interval includes this value.  The default\n    start value is 0.\nstop : number\n    End of interval.  The interval does not include this value, except\n    in some cases where `step` is not an integer and floating point\n    round-off affects the length of `out`.\nstep : number, optional\n    Spacing between values.  For any output `out`, this is the distance\n    between two adjacent values, ``out[i+1] - out[i]``.  The default\n    step size is 1.  If `step` is specified, `start` must also be given.\ndtype : dtype\n    The type of the output array.  If `dtype` is not given, infer the data\n    type from the other input arguments.\n\nReturns\n-------\narange : ndarray\n    Array of evenly spaced values.\n\n    For floating point arguments, the length of the result is\n    ``ceil((stop - start)/step)``.  Because of floating point overflow,\n    this rule may result in the last element of `out` being greater\n    than `stop`.\n\nSee Also\n--------\nlinspace : Evenly spaced numbers with careful handling of endpoints.\nogrid: Arrays of evenly spaced numbers in N-dimensions.\nmgrid: Grid-shaped arrays of evenly spaced numbers in N-dimensions.\n\nExamples\n--------\n>>> np.arange(3)\narray([0, 1, 2])\n>>> np.arange(3.0)\narray([ 0.,  1.,  2.])\n>>> np.arange(3,7)\narray([3, 4, 5, 6])\n>>> np.arange(3,7,2)\narray([3, 5])", "line": 8, "description": "function: numpy.core.numeric.arange", "type": "function", "module-name": "index_tricks"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arccos", "column": null, "docstring": "arccos(x[, out])\n\nTrigonometric inverse cosine, element-wise.\n\nThe inverse of `cos` so that, if ``y = cos(x)``, then ``x = arccos(y)``.\n\nParameters\n----------\nx : array_like\n    `x`-coordinate on the unit circle.\n    For real arguments, the domain is [-1, 1].\n\nout : ndarray, optional\n    Array of the same shape as `a`, to store results in. See\n    `doc.ufuncs` (Section \"Output arguments\") for more details.\n\nReturns\n-------\nangle : ndarray\n    The angle of the ray intersecting the unit circle at the given\n    `x`-coordinate in radians [0, pi]. If `x` is a scalar then a\n    scalar is returned, otherwise an array of the same shape as `x`\n    is returned.\n\nSee Also\n--------\ncos, arctan, arcsin, emath.arccos\n\nNotes\n-----\n`arccos` is a multivalued function: for each `x` there are infinitely\nmany numbers `z` such that `cos(z) = x`. The convention is to return\nthe angle `z` whose real part lies in `[0, pi]`.\n\nFor real-valued input data types, `arccos` always returns real output.\nFor each value that cannot be expressed as a real number or infinity,\nit yields ``nan`` and sets the `invalid` floating point error flag.\n\nFor complex-valued input, `arccos` is a complex analytic function that\nhas branch cuts `[-inf, -1]` and `[1, inf]` and is continuous from\nabove on the former and from below on the latter.\n\nThe inverse `cos` is also known as `acos` or cos^-1.\n\nReferences\n----------\nM. Abramowitz and I.A. Stegun, \"Handbook of Mathematical Functions\",\n10th printing, 1964, pp. 79. http://www.math.sfu.ca/~cbm/aands/\n\nExamples\n--------\nWe expect the arccos of 1 to be 0, and of -1 to be pi:\n\n>>> np.arccos([1, -1])\narray([ 0.        ,  3.14159265])\n\nPlot arccos:\n\n>>> import matplotlib.pyplot as plt\n>>> x = np.linspace(-1, 1, num=100)\n>>> plt.plot(x, np.arccos(x))\n>>> plt.axis('tight')\n>>> plt.show()", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arccosh", "column": null, "docstring": "arccosh(x[, out])\n\nInverse hyperbolic cosine, element-wise.\n\nParameters\n----------\nx : array_like\n    Input array.\nout : ndarray, optional\n    Array of the same shape as `x`, to store results in.\n    See `doc.ufuncs` (Section \"Output arguments\") for details.\n\n\nReturns\n-------\narccosh : ndarray\n    Array of the same shape as `x`.\n\nSee Also\n--------\n\ncosh, arcsinh, sinh, arctanh, tanh\n\nNotes\n-----\n`arccosh` is a multivalued function: for each `x` there are infinitely\nmany numbers `z` such that `cosh(z) = x`. The convention is to return the\n`z` whose imaginary part lies in `[-pi, pi]` and the real part in\n``[0, inf]``.\n\nFor real-valued input data types, `arccosh` always returns real output.\nFor each value that cannot be expressed as a real number or infinity, it\nyields ``nan`` and sets the `invalid` floating point error flag.\n\nFor complex-valued input, `arccosh` is a complex analytical function that\nhas a branch cut `[-inf, 1]` and is continuous from above on it.\n\nReferences\n----------\n.. [1] M. Abramowitz and I.A. Stegun, \"Handbook of Mathematical Functions\",\n       10th printing, 1964, pp. 86. http://www.math.sfu.ca/~cbm/aands/\n.. [2] Wikipedia, \"Inverse hyperbolic function\",\n       http://en.wikipedia.org/wiki/Arccosh\n\nExamples\n--------\n>>> np.arccosh([np.e, 10.0])\narray([ 1.65745445,  2.99322285])\n>>> np.arccosh(1)\n0.0", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arcsin", "column": null, "docstring": "arcsin(x[, out])\n\nInverse sine, element-wise.\n\nParameters\n----------\nx : array_like\n    `y`-coordinate on the unit circle.\n\nout : ndarray, optional\n    Array of the same shape as `x`, in which to store the results.\n    See `doc.ufuncs` (Section \"Output arguments\") for more details.\n\nReturns\n-------\nangle : ndarray\n    The inverse sine of each element in `x`, in radians and in the\n    closed interval ``[-pi/2, pi/2]``.  If `x` is a scalar, a scalar\n    is returned, otherwise an array.\n\nSee Also\n--------\nsin, cos, arccos, tan, arctan, arctan2, emath.arcsin\n\nNotes\n-----\n`arcsin` is a multivalued function: for each `x` there are infinitely\nmany numbers `z` such that :math:`sin(z) = x`.  The convention is to\nreturn the angle `z` whose real part lies in [-pi/2, pi/2].\n\nFor real-valued input data types, *arcsin* always returns real output.\nFor each value that cannot be expressed as a real number or infinity,\nit yields ``nan`` and sets the `invalid` floating point error flag.\n\nFor complex-valued input, `arcsin` is a complex analytic function that\nhas, by convention, the branch cuts [-inf, -1] and [1, inf]  and is\ncontinuous from above on the former and from below on the latter.\n\nThe inverse sine is also known as `asin` or sin^{-1}.\n\nReferences\n----------\nAbramowitz, M. and Stegun, I. A., *Handbook of Mathematical Functions*,\n10th printing, New York: Dover, 1964, pp. 79ff.\nhttp://www.math.sfu.ca/~cbm/aands/\n\nExamples\n--------\n>>> np.arcsin(1)     # pi/2\n1.5707963267948966\n>>> np.arcsin(-1)    # -pi/2\n-1.5707963267948966\n>>> np.arcsin(0)\n0.0", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arcsinh", "column": null, "docstring": "arcsinh(x[, out])\n\nInverse hyperbolic sine element-wise.\n\nParameters\n----------\nx : array_like\n    Input array.\nout : ndarray, optional\n    Array into which the output is placed. Its type is preserved and it\n    must be of the right shape to hold the output. See `doc.ufuncs`.\n\nReturns\n-------\nout : ndarray\n    Array of of the same shape as `x`.\n\nNotes\n-----\n`arcsinh` is a multivalued function: for each `x` there are infinitely\nmany numbers `z` such that `sinh(z) = x`. The convention is to return the\n`z` whose imaginary part lies in `[-pi/2, pi/2]`.\n\nFor real-valued input data types, `arcsinh` always returns real output.\nFor each value that cannot be expressed as a real number or infinity, it\nreturns ``nan`` and sets the `invalid` floating point error flag.\n\nFor complex-valued input, `arccos` is a complex analytical function that\nhas branch cuts `[1j, infj]` and `[-1j, -infj]` and is continuous from\nthe right on the former and from the left on the latter.\n\nThe inverse hyperbolic sine is also known as `asinh` or ``sinh^-1``.\n\nReferences\n----------\n.. [1] M. Abramowitz and I.A. Stegun, \"Handbook of Mathematical Functions\",\n       10th printing, 1964, pp. 86. http://www.math.sfu.ca/~cbm/aands/\n.. [2] Wikipedia, \"Inverse hyperbolic function\",\n       http://en.wikipedia.org/wiki/Arcsinh\n\nExamples\n--------\n>>> np.arcsinh(np.array([np.e, 10.0]))\narray([ 1.72538256,  2.99822295])", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arctan", "column": null, "docstring": "arctan(x[, out])\n\nTrigonometric inverse tangent, element-wise.\n\nThe inverse of tan, so that if ``y = tan(x)`` then ``x = arctan(y)``.\n\nParameters\n----------\nx : array_like\n    Input values.  `arctan` is applied to each element of `x`.\n\nReturns\n-------\nout : ndarray\n    Out has the same shape as `x`.  Its real part is in\n    ``[-pi/2, pi/2]`` (``arctan(+/-inf)`` returns ``+/-pi/2``).\n    It is a scalar if `x` is a scalar.\n\nSee Also\n--------\narctan2 : The \"four quadrant\" arctan of the angle formed by (`x`, `y`)\n    and the positive `x`-axis.\nangle : Argument of complex values.\n\nNotes\n-----\n`arctan` is a multi-valued function: for each `x` there are infinitely\nmany numbers `z` such that tan(`z`) = `x`.  The convention is to return\nthe angle `z` whose real part lies in [-pi/2, pi/2].\n\nFor real-valued input data types, `arctan` always returns real output.\nFor each value that cannot be expressed as a real number or infinity,\nit yields ``nan`` and sets the `invalid` floating point error flag.\n\nFor complex-valued input, `arctan` is a complex analytic function that\nhas [`1j, infj`] and [`-1j, -infj`] as branch cuts, and is continuous\nfrom the left on the former and from the right on the latter.\n\nThe inverse tangent is also known as `atan` or tan^{-1}.\n\nReferences\n----------\nAbramowitz, M. and Stegun, I. A., *Handbook of Mathematical Functions*,\n10th printing, New York: Dover, 1964, pp. 79.\nhttp://www.math.sfu.ca/~cbm/aands/\n\nExamples\n--------\nWe expect the arctan of 0 to be 0, and of 1 to be pi/4:\n\n>>> np.arctan([0, 1])\narray([ 0.        ,  0.78539816])\n\n>>> np.pi/4\n0.78539816339744828\n\nPlot arctan:\n\n>>> import matplotlib.pyplot as plt\n>>> x = np.linspace(-10, 10)\n>>> plt.plot(x, np.arctan(x))\n>>> plt.axis('tight')\n>>> plt.show()", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arctan2", "column": null, "docstring": "arctan2(x1, x2[, out])\n\nElement-wise arc tangent of ``x1/x2`` choosing the quadrant correctly.\n\nThe quadrant (i.e., branch) is chosen so that ``arctan2(x1, x2)`` is\nthe signed angle in radians between the ray ending at the origin and\npassing through the point (1,0), and the ray ending at the origin and\npassing through the point (`x2`, `x1`).  (Note the role reversal: the\n\"`y`-coordinate\" is the first function parameter, the \"`x`-coordinate\"\nis the second.)  By IEEE convention, this function is defined for\n`x2` = +/-0 and for either or both of `x1` and `x2` = +/-inf (see\nNotes for specific values).\n\nThis function is not defined for complex-valued arguments; for the\nso-called argument of complex values, use `angle`.\n\nParameters\n----------\nx1 : array_like, real-valued\n    `y`-coordinates.\nx2 : array_like, real-valued\n    `x`-coordinates. `x2` must be broadcastable to match the shape of\n    `x1` or vice versa.\n\nReturns\n-------\nangle : ndarray\n    Array of angles in radians, in the range ``[-pi, pi]``.\n\nSee Also\n--------\narctan, tan, angle\n\nNotes\n-----\n*arctan2* is identical to the `atan2` function of the underlying\nC library.  The following special values are defined in the C\nstandard: [1]_\n\n====== ====== ================\n`x1`   `x2`   `arctan2(x1,x2)`\n====== ====== ================\n+/- 0  +0     +/- 0\n+/- 0  -0     +/- pi\n > 0   +/-inf +0 / +pi\n < 0   +/-inf -0 / -pi\n+/-inf +inf   +/- (pi/4)\n+/-inf -inf   +/- (3*pi/4)\n====== ====== ================\n\nNote that +0 and -0 are distinct floating point numbers, as are +inf\nand -inf.\n\nReferences\n----------\n.. [1] ISO/IEC standard 9899:1999, \"Programming language C.\"\n\nExamples\n--------\nConsider four points in different quadrants:\n\n>>> x = np.array([-1, +1, +1, -1])\n>>> y = np.array([-1, -1, +1, +1])\n>>> np.arctan2(y, x) * 180 / np.pi\narray([-135.,  -45.,   45.,  135.])\n\nNote the order of the parameters. `arctan2` is defined also when `x2` = 0\nand at several other special points, obtaining values in\nthe range ``[-pi, pi]``:\n\n>>> np.arctan2([1., -1.], [0., 0.])\narray([ 1.57079633, -1.57079633])\n>>> np.arctan2([0., 0., np.inf], [+0., -0., np.inf])\narray([ 0.        ,  3.14159265,  0.78539816])", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "arctanh", "column": null, "docstring": "arctanh(x[, out])\n\nInverse hyperbolic tangent element-wise.\n\nParameters\n----------\nx : array_like\n    Input array.\n\nReturns\n-------\nout : ndarray\n    Array of the same shape as `x`.\n\nSee Also\n--------\nemath.arctanh\n\nNotes\n-----\n`arctanh` is a multivalued function: for each `x` there are infinitely\nmany numbers `z` such that `tanh(z) = x`. The convention is to return\nthe `z` whose imaginary part lies in `[-pi/2, pi/2]`.\n\nFor real-valued input data types, `arctanh` always returns real output.\nFor each value that cannot be expressed as a real number or infinity,\nit yields ``nan`` and sets the `invalid` floating point error flag.\n\nFor complex-valued input, `arctanh` is a complex analytical function\nthat has branch cuts `[-1, -inf]` and `[1, inf]` and is continuous from\nabove on the former and from below on the latter.\n\nThe inverse hyperbolic tangent is also known as `atanh` or ``tanh^-1``.\n\nReferences\n----------\n.. [1] M. Abramowitz and I.A. Stegun, \"Handbook of Mathematical Functions\",\n       10th printing, 1964, pp. 86. http://www.math.sfu.ca/~cbm/aands/\n.. [2] Wikipedia, \"Inverse hyperbolic function\",\n       http://en.wikipedia.org/wiki/Arctanh\n\nExamples\n--------\n>>> np.arctanh([0, -0.5])\narray([ 0.        , -0.54930614])", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "fromnumeric.argmax", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "argmax", "column": 4, "docstring": "argmax(a, axis=None)\n\nIndices of the maximum values along an axis.\n\nParameters\n----------\na : array_like\n    Input array.\naxis : int, optional\n    By default, the index is into the flattened array, otherwise\n    along the specified axis.\n\nReturns\n-------\nindex_array : ndarray of ints\n    Array of indices into the array. It has the same shape as `a.shape`\n    with the dimension along `axis` removed.\n\nSee Also\n--------\nndarray.argmax, argmin\namax : The maximum value along a given axis.\nunravel_index : Convert a flat index into an index tuple.\n\nNotes\n-----\nIn case of multiple occurrences of the maximum values, the indices\ncorresponding to the first occurrence are returned.\n\nExamples\n--------\n>>> a = np.arange(6).reshape(2,3)\n>>> a\narray([[0, 1, 2],\n       [3, 4, 5]])\n>>> np.argmax(a)\n5\n>>> np.argmax(a, axis=0)\narray([1, 1, 1])\n>>> np.argmax(a, axis=1)\narray([2, 2])\n\n>>> b = np.arange(6)\n>>> b[1] = 5\n>>> b\narray([0, 5, 2, 3, 4, 5])\n>>> np.argmax(b) # Only the first occurrence is returned.\n1", "line": 889, "description": "function: fromnumeric.argmax", "type": "function", "module-name": "fromnumeric"}, {"full-name": "fromnumeric.argmin", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "argmin", "column": 4, "docstring": "argmin(a, axis=None)\n\nReturn the indices of the minimum values along an axis.\n\nSee Also\n--------\nargmax : Similar function.  Please refer to `numpy.argmax` for detailed\n    documentation.", "line": 946, "description": "function: fromnumeric.argmin", "type": "function", "module-name": "fromnumeric"}, {"full-name": "fromnumeric.argpartition", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "argpartition", "column": 4, "docstring": "argpartition(a, kth, axis=-1, kind='introselect', order=None)\n\nPerform an indirect partition along the given axis using the algorithm\nspecified by the `kind` keyword. It returns an array of indices of the\nsame shape as `a` that index data along the given axis in partitioned\norder.\n\n.. versionadded:: 1.8.0\n\nParameters\n----------\na : array_like\n    Array to sort.\nkth : int or sequence of ints\n    Element index to partition by. The kth element will be in its final\n    sorted position and all smaller elements will be moved before it and\n    all larger elements behind it.\n    The order all elements in the partitions is undefined.\n    If provided with a sequence of kth it will partition all of them into\n    their sorted position at once.\naxis : int or None, optional\n    Axis along which to sort.  The default is -1 (the last axis). If None,\n    the flattened array is used.\nkind : {'introselect'}, optional\n    Selection algorithm. Default is 'introselect'\norder : list, optional\n    When `a` is an array with fields defined, this argument specifies\n    which fields to compare first, second, etc.  Not all fields need be\n    specified.\n\nReturns\n-------\nindex_array : ndarray, int\n    Array of indices that partition `a` along the specified axis.\n    In other words, ``a[index_array]`` yields a sorted `a`.\n\nSee Also\n--------\npartition : Describes partition algorithms used.\nndarray.partition : Inplace partition.\nargsort : Full indirect sort\n\nNotes\n-----\nSee `partition` for notes on the different selection algorithms.\n\nExamples\n--------\nOne dimensional array:\n\n>>> x = np.array([3, 4, 2, 1])\n>>> x[np.argpartition(x, 3)]\narray([2, 1, 3, 4])\n>>> x[np.argpartition(x, (1, 3))]\narray([1, 2, 3, 4])\n\n>>> x = [3, 4, 2, 1]\n>>> np.array(x)[np.argpartition(x, 3)]\narray([2, 1, 3, 4])", "line": 626, "description": "function: fromnumeric.argpartition", "type": "function", "module-name": "fromnumeric"}, {"full-name": "fromnumeric.argsort", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "argsort", "column": 4, "docstring": "argsort(a, axis=-1, kind='quicksort', order=None)\n\nReturns the indices that would sort an array.\n\nPerform an indirect sort along the given axis using the algorithm specified\nby the `kind` keyword. It returns an array of indices of the same shape as\n`a` that index data along the given axis in sorted order.\n\nParameters\n----------\na : array_like\n    Array to sort.\naxis : int or None, optional\n    Axis along which to sort.  The default is -1 (the last axis). If None,\n    the flattened array is used.\nkind : {'quicksort', 'mergesort', 'heapsort'}, optional\n    Sorting algorithm.\norder : list, optional\n    When `a` is an array with fields defined, this argument specifies\n    which fields to compare first, second, etc.  Not all fields need be\n    specified.\n\nReturns\n-------\nindex_array : ndarray, int\n    Array of indices that sort `a` along the specified axis.\n    In other words, ``a[index_array]`` yields a sorted `a`.\n\nSee Also\n--------\nsort : Describes sorting algorithms used.\nlexsort : Indirect stable sort with multiple keys.\nndarray.sort : Inplace sort.\nargpartition : Indirect partial sort.\n\nNotes\n-----\nSee `sort` for notes on the different sorting algorithms.\n\nAs of NumPy 1.4.0 `argsort` works with real/complex arrays containing\nnan values. The enhanced sort order is documented in `sort`.\n\nExamples\n--------\nOne dimensional array:\n\n>>> x = np.array([3, 1, 2])\n>>> np.argsort(x)\narray([1, 2, 0])\n\nTwo-dimensional array:\n\n>>> x = np.array([[0, 3], [2, 2]])\n>>> x\narray([[0, 3],\n       [2, 2]])\n\n>>> np.argsort(x, axis=0)\narray([[0, 1],\n       [1, 0]])\n\n>>> np.argsort(x, axis=1)\narray([[0, 1],\n       [0, 1]])\n\nSorting with keys:\n\n>>> x = np.array([(1, 0), (0, 1)], dtype=[('x', '<i4'), ('y', '<i4')])\n>>> x\narray([(1, 0), (0, 1)],\n      dtype=[('x', '<i4'), ('y', '<i4')])\n\n>>> np.argsort(x, order=('x','y'))\narray([1, 0])\n\n>>> np.argsort(x, order=('y','x'))\narray([0, 1])", "line": 803, "description": "function: fromnumeric.argsort", "type": "function", "module-name": "fromnumeric"}, {"full-name": "numeric.argwhere", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "argwhere", "column": 4, "docstring": "argwhere(a)\n\nFind the indices of array elements that are non-zero, grouped by element.\n\nParameters\n----------\na : array_like\n    Input data.\n\nReturns\n-------\nindex_array : ndarray\n    Indices of elements that are non-zero. Indices are grouped by element.\n\nSee Also\n--------\nwhere, nonzero\n\nNotes\n-----\n``np.argwhere(a)`` is the same as ``np.transpose(np.nonzero(a))``.\n\nThe output of ``argwhere`` is not suitable for indexing arrays.\nFor this purpose use ``where(a)`` instead.\n\nExamples\n--------\n>>> x = np.arange(6).reshape(2,3)\n>>> x\narray([[0, 1, 2],\n       [3, 4, 5]])\n>>> np.argwhere(x>1)\narray([[0, 2],\n       [1, 0],\n       [1, 1],\n       [1, 2]])", "line": 733, "description": "function: numeric.argwhere", "type": "function", "module-name": "numeric"}, {"full-name": "fromnumeric.around", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", "name": "around", "column": 4, "docstring": "around(a, decimals=0, out=None)\n\nEvenly round to the given number of decimals.\n\nParameters\n----------\na : array_like\n    Input data.\ndecimals : int, optional\n    Number of decimal places to round to (default: 0).  If\n    decimals is negative, it specifies the number of positions to\n    the left of the decimal point.\nout : ndarray, optional\n    Alternative output array in which to place the result. It must have\n    the same shape as the expected output, but the type of the output\n    values will be cast if necessary. See `doc.ufuncs` (Section\n    \"Output arguments\") for details.\n\nReturns\n-------\nrounded_array : ndarray\n    An array of the same type as `a`, containing the rounded values.\n    Unless `out` was specified, a new array is created.  A reference to\n    the result is returned.\n\n    The real and imaginary parts of complex numbers are rounded\n    separately.  The result of rounding a float is a float.\n\nSee Also\n--------\nndarray.round : equivalent method\n\nceil, fix, floor, rint, trunc\n\n\nNotes\n-----\nFor values exactly halfway between rounded decimal values, Numpy\nrounds to the nearest even value. Thus 1.5 and 2.5 round to 2.0,\n-0.5 and 0.5 round to 0.0, etc. Results may also be surprising due\nto the inexact representation of decimal fractions in the IEEE\nfloating point standard [1]_ and errors introduced when scaling\nby powers of ten.\n\nReferences\n----------\n.. [1] \"Lecture Notes on the Status of  IEEE 754\", William Kahan,\n       http://www.cs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF\n.. [2] \"How Futile are Mindless Assessments of\n       Roundoff in Floating-Point Computation?\", William Kahan,\n       http://www.cs.berkeley.edu/~wkahan/Mindless.pdf\n\nExamples\n--------\n>>> np.around([0.37, 1.64])\narray([ 0.,  2.])\n>>> np.around([0.37, 1.64], decimals=1)\narray([ 0.4,  1.6])\n>>> np.around([.5, 1.5, 2.5, 3.5, 4.5]) # rounds to nearest even value\narray([ 0.,  2.,  2.,  4.,  4.])\n>>> np.around([1,2,3,11], decimals=1) # ndarray of ints is returned\narray([ 1,  2,  3, 11])\n>>> np.around([1,2,3,11], decimals=-1)\narray([ 0,  0,  0, 10])", "line": 2560, "description": "function: fromnumeric.around", "type": "function", "module-name": "fromnumeric"}, {"full-name": "numpy.core.numeric.array", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "array", "column": 38, "docstring": "array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)\n\nCreate an array.\n\nParameters\n----------\nobject : array_like\n    An array, any object exposing the array interface, an\n    object whose __array__ method returns an array, or any\n    (nested) sequence.\ndtype : data-type, optional\n    The desired data-type for the array.  If not given, then\n    the type will be determined as the minimum type required\n    to hold the objects in the sequence.  This argument can only\n    be used to 'upcast' the array.  For downcasting, use the\n    .astype(t) method.\ncopy : bool, optional\n    If true (default), then the object is copied.  Otherwise, a copy\n    will only be made if __array__ returns a copy, if obj is a\n    nested sequence, or if a copy is needed to satisfy any of the other\n    requirements (`dtype`, `order`, etc.).\norder : {'C', 'F', 'A'}, optional\n    Specify the order of the array.  If order is 'C' (default), then the\n    array will be in C-contiguous order (last-index varies the\n    fastest).  If order is 'F', then the returned array\n    will be in Fortran-contiguous order (first-index varies the\n    fastest).  If order is 'A', then the returned array may\n    be in any order (either C-, Fortran-contiguous, or even\n    discontiguous).\nsubok : bool, optional\n    If True, then sub-classes will be passed-through, otherwise\n    the returned array will be forced to be a base-class array (default).\nndmin : int, optional\n    Specifies the minimum number of dimensions that the resulting\n    array should have.  Ones will be pre-pended to the shape as\n    needed to meet this requirement.\n\nReturns\n-------\nout : ndarray\n    An array object satisfying the specified requirements.\n\nSee Also\n--------\nempty, empty_like, zeros, zeros_like, ones, ones_like, fill\n\nExamples\n--------\n>>> np.array([1, 2, 3])\narray([1, 2, 3])\n\nUpcasting:\n\n>>> np.array([1, 2, 3.0])\narray([ 1.,  2.,  3.])\n\nMore than one dimension:\n\n>>> np.array([[1, 2], [3, 4]])\narray([[1, 2],\n       [3, 4]])\n\nMinimum dimensions 2:\n\n>>> np.array([1, 2, 3], ndmin=2)\narray([[1, 2, 3]])\n\nType provided:\n\n>>> np.array([1, 2, 3], dtype=complex)\narray([ 1.+0.j,  2.+0.j,  3.+0.j])\n\nData-type consisting of more than one element:\n\n>>> x = np.array([(1,2),(3,4)],dtype=[('a','<i4'),('b','<i4')])\n>>> x['a']\narray([1, 3])\n\nCreating an array from sub-classes:\n\n>>> np.array(np.mat('1 2; 3 4'))\narray([[1, 2],\n       [3, 4]])\n\n>>> np.array(np.mat('1 2; 3 4'), subok=True)\nmatrix([[1, 2],\n        [3, 4]])", "line": 12, "description": "function: numpy.core.numeric.array", "type": "function", "module-name": "function_base"}, {"full-name": "arrayprint.array2string", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "array2string", "column": 24, "docstring": "array2string(a, max_line_width=None, precision=None,\nsuppress_small=None, separator=' ', prefix=\"\",\nstyle=repr, formatter=None)\n\nReturn a string representation of an array.\n\nParameters\n----------\na : ndarray\n    Input array.\nmax_line_width : int, optional\n    The maximum number of columns the string should span. Newline\n    characters splits the string appropriately after array elements.\nprecision : int, optional\n    Floating point precision. Default is the current printing\n    precision (usually 8), which can be altered using `set_printoptions`.\nsuppress_small : bool, optional\n    Represent very small numbers as zero. A number is \"very small\" if it\n    is smaller than the current printing precision.\nseparator : str, optional\n    Inserted between elements.\nprefix : str, optional\n    An array is typically printed as::\n\n      'prefix(' + array2string(a) + ')'\n\n    The length of the prefix string is used to align the\n    output correctly.\nstyle : function, optional\n    A function that accepts an ndarray and returns a string.  Used only\n    when the shape of `a` is equal to ``()``, i.e. for 0-D arrays.\nformatter : dict of callables, optional\n    If not None, the keys should indicate the type(s) that the respective\n    formatting function applies to.  Callables should return a string.\n    Types that are not specified (by their corresponding keys) are handled\n    by the default formatters.  Individual types for which a formatter\n    can be set are::\n\n        - 'bool'\n        - 'int'\n        - 'timedelta' : a `numpy.timedelta64`\n        - 'datetime' : a `numpy.datetime64`\n        - 'float'\n        - 'longfloat' : 128-bit floats\n        - 'complexfloat'\n        - 'longcomplexfloat' : composed of two 128-bit floats\n        - 'numpy_str' : types `numpy.string_` and `numpy.unicode_`\n        - 'str' : all other strings\n\n    Other keys that can be used to set a group of types at once are::\n\n        - 'all' : sets all types\n        - 'int_kind' : sets 'int'\n        - 'float_kind' : sets 'float' and 'longfloat'\n        - 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'\n        - 'str_kind' : sets 'str' and 'numpystr'\n\nReturns\n-------\narray_str : str\n    String representation of the array.\n\nRaises\n------\nTypeError\n    if a callable in `formatter` does not return a string.\n\nSee Also\n--------\narray_str, array_repr, set_printoptions, get_printoptions\n\nNotes\n-----\nIf a formatter is specified for a certain type, the `precision` keyword is\nignored for that type.\n\nExamples\n--------\n>>> x = np.array([1e-16,1,2,3])\n>>> print np.array2string(x, precision=2, separator=',',\n...                       suppress_small=True)\n[ 0., 1., 2., 3.]\n\n>>> x  = np.arange(3.)\n>>> np.array2string(x, formatter={'float_kind':lambda x: \"%.2f\" % x})\n'[0.00 1.00 2.00]'\n\n>>> x  = np.arange(3)\n>>> np.array2string(x, formatter={'int':lambda x: hex(x)})\n'[0x0L 0x1L 0x2L]'", "line": 1600, "description": "function: arrayprint.array2string", "type": "function", "module-name": "numeric"}, {"full-name": "numeric.array_equal", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "array_equal", "column": 4, "docstring": "array_equal(a1, a2)\n\nTrue if two arrays have the same shape and elements, False otherwise.\n\nParameters\n----------\na1, a2 : array_like\n    Input arrays.\n\nReturns\n-------\nb : bool\n    Returns True if the arrays are equal.\n\nSee Also\n--------\nallclose: Returns True if two arrays are element-wise equal within a\n          tolerance.\narray_equiv: Returns True if input arrays are shape consistent and all\n             elements equal.\n\nExamples\n--------\n>>> np.array_equal([1, 2], [1, 2])\nTrue\n>>> np.array_equal(np.array([1, 2]), np.array([1, 2]))\nTrue\n>>> np.array_equal([1, 2], [1, 2, 3])\nFalse\n>>> np.array_equal([1, 2], [1, 4])\nFalse", "line": 2328, "description": "function: numeric.array_equal", "type": "function", "module-name": "numeric"}, {"full-name": "numeric.array_equiv", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "array_equiv", "column": 4, "docstring": "array_equiv(a1, a2)\n\nReturns True if input arrays are shape consistent and all elements equal.\n\nShape consistent means they are either the same shape, or one input array\ncan be broadcasted to create the same shape as the other one.\n\nParameters\n----------\na1, a2 : array_like\n    Input arrays.\n\nReturns\n-------\nout : bool\n    True if equivalent, False otherwise.\n\nExamples\n--------\n>>> np.array_equiv([1, 2], [1, 2])\nTrue\n>>> np.array_equiv([1, 2], [1, 3])\nFalse\n\nShowing the shape equivalence:\n\n>>> np.array_equiv([1, 2], [[1, 2], [1, 2]])\nTrue\n>>> np.array_equiv([1, 2], [[1, 2, 1, 2], [1, 2, 1, 2]])\nFalse\n\n>>> np.array_equiv([1, 2], [[1, 2], [1, 3]])\nFalse", "line": 2369, "description": "function: numeric.array_equiv", "type": "function", "module-name": "numeric"}, {"full-name": "type_check", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", "name": "array_precision", "column": 0, "docstring": "", "line": 547, "description": "statement: array_precision = {_nx.single: 0,\n                   _nx.double: 1,\n                   _nx.longdouble: 2,\n                   _nx.csingle: 0,\n                   _nx.cdouble: 1,\n                   _nx.clongdouble: 2}", "type": "statement", "module-name": "type_check"}, {"full-name": "numeric.array_repr", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "array_repr", "column": 4, "docstring": "array_repr(arr, max_line_width=None, precision=None,\nsuppress_small=None)\n\nReturn the string representation of an array.\n\nParameters\n----------\narr : ndarray\n    Input array.\nmax_line_width : int, optional\n    The maximum number of columns the string should span. Newline\n    characters split the string appropriately after array elements.\nprecision : int, optional\n    Floating point precision. Default is the current printing precision\n    (usually 8), which can be altered using `set_printoptions`.\nsuppress_small : bool, optional\n    Represent very small numbers as zero, default is False. Very small\n    is defined by `precision`, if the precision is 8 then\n    numbers smaller than 5e-9 are represented as zero.\n\nReturns\n-------\nstring : str\n  The string representation of an array.\n\nSee Also\n--------\narray_str, array2string, set_printoptions\n\nExamples\n--------\n>>> np.array_repr(np.array([1,2]))\n'array([1, 2])'\n>>> np.array_repr(np.ma.array([0.]))\n'MaskedArray([ 0.])'\n>>> np.array_repr(np.array([], np.int32))\n'array([], dtype=int32)'\n\n>>> x = np.array([1e-6, 4e-7, 2, 3])\n>>> np.array_repr(x, precision=6, suppress_small=True)\n'array([ 0.000001,  0.      ,  2.      ,  3.      ])'", "line": 1609, "description": "function: numeric.array_repr", "type": "function", "module-name": "numeric"}, {"full-name": "shape_base.array_split", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", "name": "array_split", "column": 4, "docstring": "array_split(ary, indices_or_sections, axis=0)\n\nSplit an array into multiple sub-arrays.\n\nPlease refer to the ``split`` documentation.  The only difference\nbetween these functions is that ``array_split`` allows\n`indices_or_sections` to be an integer that does *not* equally\ndivide the axis.\n\nSee Also\n--------\nsplit : Split array into multiple sub-arrays of equal size.\n\nExamples\n--------\n>>> x = np.arange(8.0)\n>>> np.array_split(x, 3)\n    [array([ 0.,  1.,  2.]), array([ 3.,  4.,  5.]), array([ 6.,  7.])]", "line": 377, "description": "function: shape_base.array_split", "type": "function", "module-name": "shape_base"}, {"full-name": "numeric.array_str", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "array_str", "column": 4, "docstring": "array_str(a, max_line_width=None, precision=None, suppress_small=None)\n\nReturn a string representation of the data in an array.\n\nThe data in the array is returned as a single string.  This function is\nsimilar to `array_repr`, the difference being that `array_repr` also\nreturns information on the kind of array and its data type.\n\nParameters\n----------\na : ndarray\n    Input array.\nmax_line_width : int, optional\n    Inserts newlines if text is longer than `max_line_width`.  The\n    default is, indirectly, 75.\nprecision : int, optional\n    Floating point precision.  Default is the current printing precision\n    (usually 8), which can be altered using `set_printoptions`.\nsuppress_small : bool, optional\n    Represent numbers \"very close\" to zero as zero; default is False.\n    Very close is defined by precision: if the precision is 8, e.g.,\n    numbers smaller (in absolute value) than 5e-9 are represented as\n    zero.\n\nSee Also\n--------\narray2string, array_repr, set_printoptions\n\nExamples\n--------\n>>> np.array_str(np.arange(3))\n'[0 1 2]'", "line": 1681, "description": "function: numeric.array_str", "type": "function", "module-name": "numeric"}, {"full-name": "type_check", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", "name": "array_type", "column": 0, "docstring": "", "line": 545, "description": "statement: array_type = [[_nx.single, _nx.double, _nx.longdouble],\n              [_nx.csingle, _nx.cdouble, _nx.clongdouble]]", "type": "statement", "module-name": "type_check"}, {"full-name": "arrayterator.Arrayterator", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/arrayterator.py", "name": "Arrayterator", "column": 6, "docstring": "Arrayterator(self, var, buf_size=None)\n\nBuffered iterator for big arrays.\n\n`Arrayterator` creates a buffered iterator for reading big arrays in small\ncontiguous blocks. The class is useful for objects stored in the\nfile system. It allows iteration over the object *without* reading\neverything in memory; instead, small blocks are read and iterated over.\n\n`Arrayterator` can be used with any object that supports multidimensional\nslices. This includes NumPy arrays, but also variables from\nScientific.IO.NetCDF or pynetcdf for example.\n\nParameters\n----------\nvar : array_like\n    The object to iterate over.\nbuf_size : int, optional\n    The buffer size. If `buf_size` is supplied, the maximum amount of\n    data that will be read into memory is `buf_size` elements.\n    Default is None, which will read as many element as possible\n    into memory.\n\nAttributes\n----------\nvar\nbuf_size\nstart\nstop\nstep\nshape\nflat\n\nSee Also\n--------\nndenumerate : Multidimensional array iterator.\nflatiter : Flat array iterator.\nmemmap : Create a memory-map to an array stored in a binary file on disk.\n\nNotes\n-----\nThe algorithm works by first finding a \"running dimension\", along which\nthe blocks will be extracted. Given an array of dimensions\n``(d1, d2, ..., dn)``, e.g. if `buf_size` is smaller than ``d1``, the\nfirst dimension will be used. If, on the other hand,\n``d1 < buf_size < d1*d2`` the second dimension will be used, and so on.\nBlocks are extracted along this dimension, and when the last block is\nreturned the process continues from the next dimension, until all\nelements have been read.\n\nExamples\n--------\n>>> import numpy as np\n>>> a = np.arange(3 * 4 * 5 * 6).reshape(3, 4, 5, 6)\n>>> a_itor = np.lib.arrayterator.Arrayterator(a, 2)\n>>> a_itor.shape\n(3, 4, 5, 6)\n\nNow we can iterate over ``a_itor``, and it will return arrays of size\ntwo. Since `buf_size` was smaller than any dimension, the first\ndimension will be iterated over first:\n\n>>> for subarr in a_itor:\n...     if not subarr.all():\n...         print subarr, subarr.shape\n...\n[[[[0 1]]]] (1, 1, 1, 2)", "line": 20, "description": "class: arrayterator.Arrayterator", "type": "class", "module-name": "arrayterator"}, {"full-name": "stride_tricks.as_strided", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/stride_tricks.py", "name": "as_strided", "column": 4, "docstring": "as_strided(x, shape=None, strides=None)\n\nMake an ndarray from the given array with the given shape and strides.\n    ", "line": 23, "description": "function: stride_tricks.as_strided", "type": "function", "module-name": "stride_tricks"}, {"full-name": "numpy.core.numeric.asanyarray", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", "name": "asanyarray", "column": 57, "docstring": "asanyarray(a, dtype=None, order=None)\n\nConvert the input to an ndarray, but pass ndarray subclasses through.\n\nParameters\n----------\na : array_like\n    Input data, in any form that can be converted to an array.  This\n    includes scalars, lists, lists of tuples, tuples, tuples of tuples,\n    tuples of lists, and ndarrays.\ndtype : data-type, optional\n    By default, the data-type is inferred from the input data.\norder : {'C', 'F'}, optional\n    Whether to use row-major ('C') or column-major ('F') memory\n    representation.  Defaults to 'C'.\n\nReturns\n-------\nout : ndarray or an ndarray subclass\n    Array interpretation of `a`.  If `a` is an ndarray or a subclass\n    of ndarray, it is returned as-is and no copy is performed.\n\nSee Also\n--------\nasarray : Similar function which always returns ndarrays.\nascontiguousarray : Convert input to a contiguous array.\nasfarray : Convert input to a floating point ndarray.\nasfortranarray : Convert input to an ndarray with column-major\n                 memory order.\nasarray_chkfinite : Similar function which checks input for NaNs and\n                    Infs.\nfromiter : Create an array from an iterator.\nfromfunction : Construct an array by executing a function on grid\n               positions.\n\nExamples\n--------\nConvert a list into an array:\n\n>>> a = [1, 2]\n>>> np.asanyarray(a)\narray([1, 2])\n\nInstances of `ndarray` subclasses are passed through as-is:\n\n>>> a = np.matrix([1, 2])\n>>> np.asanyarray(a) is a\nTrue", "line": 7, "description": "function: numpy.core.numeric.asanyarray", "type": "function", "module-name": "shape_base"}, {"full-name": "numeric.asarray", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "asarray", "column": 4, "docstring": "asarray(a, dtype=None, order=None)\n\nConvert the input to an array.\n\nParameters\n----------\na : array_like\n    Input data, in any form that can be converted to an array.  This\n    includes lists, lists of tuples, tuples, tuples of tuples, tuples\n    of lists and ndarrays.\ndtype : data-type, optional\n    By default, the data-type is inferred from the input data.\norder : {'C', 'F'}, optional\n    Whether to use row-major ('C') or column-major ('F' for FORTRAN)\n    memory representation.  Defaults to 'C'.\n\nReturns\n-------\nout : ndarray\n    Array interpretation of `a`.  No copy is performed if the input\n    is already an ndarray.  If `a` is a subclass of ndarray, a base\n    class ndarray is returned.\n\nSee Also\n--------\nasanyarray : Similar function which passes through subclasses.\nascontiguousarray : Convert input to a contiguous array.\nasfarray : Convert input to a floating point ndarray.\nasfortranarray : Convert input to an ndarray with column-major\n                 memory order.\nasarray_chkfinite : Similar function which checks input for NaNs and Infs.\nfromiter : Create an array from an iterator.\nfromfunction : Construct an array by executing a function on grid\n               positions.\n\nExamples\n--------\nConvert a list into an array:\n\n>>> a = [1, 2]\n>>> np.asarray(a)\narray([1, 2])\n\nExisting arrays are not copied:\n\n>>> a = np.array([1, 2])\n>>> np.asarray(a) is a\nTrue\n\nIf `dtype` is set, array is copied only if dtype does not match:\n\n>>> a = np.array([1, 2], dtype=np.float32)\n>>> np.asarray(a, dtype=np.float32) is a\nTrue\n>>> np.asarray(a, dtype=np.float64) is a\nFalse\n\nContrary to `asanyarray`, ndarray subclasses are not passed through:\n\n>>> issubclass(np.matrix, np.ndarray)\nTrue\n>>> a = np.matrix([[1, 2]])\n>>> np.asarray(a) is a\nFalse\n>>> np.asanyarray(a) is a\nTrue", "line": 394, "description": "function: numeric.asarray", "type": "function", "module-name": "numeric"}, {"full-name": "function_base.asarray_chkfinite", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "asarray_chkfinite", "column": 4, "docstring": "asarray_chkfinite(a, dtype=None, order=None)\n\nConvert the input to an array, checking for NaNs or Infs.\n\nParameters\n----------\na : array_like\n    Input data, in any form that can be converted to an array.  This\n    includes lists, lists of tuples, tuples, tuples of tuples, tuples\n    of lists and ndarrays.  Success requires no NaNs or Infs.\ndtype : data-type, optional\n    By default, the data-type is inferred from the input data.\norder : {'C', 'F'}, optional\n    Whether to use row-major ('C') or column-major ('FORTRAN') memory\n    representation.  Defaults to 'C'.\n\nReturns\n-------\nout : ndarray\n    Array interpretation of `a`.  No copy is performed if the input\n    is already an ndarray.  If `a` is a subclass of ndarray, a base\n    class ndarray is returned.\n\nRaises\n------\nValueError\n    Raises ValueError if `a` contains NaN (Not a Number) or Inf (Infinity).\n\nSee Also\n--------\nasarray : Create and array.\nasanyarray : Similar function which passes through subclasses.\nascontiguousarray : Convert input to a contiguous array.\nasfarray : Convert input to a floating point ndarray.\nasfortranarray : Convert input to an ndarray with column-major\n                 memory order.\nfromiter : Create an array from an iterator.\nfromfunction : Construct an array by executing a function on grid\n               positions.\n\nExamples\n--------\nConvert a list into an array.  If all elements are finite\n``asarray_chkfinite`` is identical to ``asarray``.\n\n>>> a = [1, 2]\n>>> np.asarray_chkfinite(a, dtype=float)\narray([1., 2.])\n\nRaises ValueError if array_like contains Nans or Infs.\n\n>>> a = [1, 2, np.inf]\n>>> try:\n...     np.asarray_chkfinite(a)\n... except ValueError:\n...     print 'ValueError'\n...\nValueError", "line": 550, "description": "function: function_base.asarray_chkfinite", "type": "function", "module-name": "function_base"}, {"full-name": "numpy.compat.asbytes", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", "name": "asbytes", "column": 4, "docstring": "str(object='') -> string\n\nReturn a nice string representation of the object.\nIf the argument is a string, the return value is the same object.", "line": 22, "description": "class: numpy.compat.asbytes", "type": "class", "module-name": "npyio"}, {"full-name": "numpy.compat.asbytes_nested", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", "name": "asbytes_nested", "column": 20, "docstring": "asbytes_nested(x)\n\n", "line": 22, "description": "function: numpy.compat.asbytes_nested", "type": "function", "module-name": "npyio"}, {"full-name": "numeric.ascontiguousarray", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "ascontiguousarray", "column": 4, "docstring": "ascontiguousarray(a, dtype=None)\n\nReturn a contiguous array in memory (C order).\n\nParameters\n----------\na : array_like\n    Input array.\ndtype : str or dtype object, optional\n    Data-type of returned array.\n\nReturns\n-------\nout : ndarray\n    Contiguous array of same shape and content as `a`, with type `dtype`\n    if specified.\n\nSee Also\n--------\nasfortranarray : Convert input to an ndarray with column-major\n                 memory order.\nrequire : Return an ndarray that satisfies requirements.\nndarray.flags : Information about the memory layout of the array.\n\nExamples\n--------\n>>> x = np.arange(6).reshape(2,3)\n>>> np.ascontiguousarray(x, dtype=np.float32)\narray([[ 0.,  1.,  2.],\n       [ 3.,  4.,  5.]], dtype=float32)\n>>> x.flags['C_CONTIGUOUS']\nTrue", "line": 516, "description": "function: numeric.ascontiguousarray", "type": "function", "module-name": "numeric"}, {"full-name": "type_check.asfarray", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", "name": "asfarray", "column": 4, "docstring": "asfarray(a, dtype=_nx.float_)\n\nReturn an array converted to a float type.\n\nParameters\n----------\na : array_like\n    The input array.\ndtype : str or dtype object, optional\n    Float type code to coerce input array `a`.  If `dtype` is one of the\n    'int' dtypes, it is replaced with float64.\n\nReturns\n-------\nout : ndarray\n    The input `a` as a float ndarray.\n\nExamples\n--------\n>>> np.asfarray([2, 3])\narray([ 2.,  3.])\n>>> np.asfarray([2, 3], dtype='float')\narray([ 2.,  3.])\n>>> np.asfarray([2, 3], dtype='int8')\narray([ 2.,  3.])", "line": 75, "description": "function: type_check.asfarray", "type": "function", "module-name": "type_check"}, {"full-name": "numeric.asfortranarray", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "asfortranarray", "column": 4, "docstring": "asfortranarray(a, dtype=None)\n\nReturn an array laid out in Fortran order in memory.\n\nParameters\n----------\na : array_like\n    Input array.\ndtype : str or dtype object, optional\n    By default, the data-type is inferred from the input data.\n\nReturns\n-------\nout : ndarray\n    The input `a` in Fortran, or column-major, order.\n\nSee Also\n--------\nascontiguousarray : Convert input to a contiguous (C order) array.\nasanyarray : Convert input to an ndarray with either row or\n    column-major memory order.\nrequire : Return an ndarray that satisfies requirements.\nndarray.flags : Information about the memory layout of the array.\n\nExamples\n--------\n>>> x = np.arange(6).reshape(2,3)\n>>> y = np.asfortranarray(x)\n>>> x.flags['F_CONTIGUOUS']\nFalse\n>>> y.flags['F_CONTIGUOUS']\nTrue", "line": 552, "description": "function: numeric.asfortranarray", "type": "function", "module-name": "numeric"}, {"full-name": "defmatrix.asmatrix", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/matrixlib/defmatrix.py", "name": "asmatrix", "column": 4, "docstring": "asmatrix(data, dtype=None)\n\nInterpret the input as a matrix.\n\nUnlike `matrix`, `asmatrix` does not make a copy if the input is already\na matrix or an ndarray.  Equivalent to ``matrix(data, copy=False)``.\n\nParameters\n----------\ndata : array_like\n    Input data.\n\nReturns\n-------\nmat : matrix\n    `data` interpreted as a matrix.\n\nExamples\n--------\n>>> x = np.array([[1, 2], [3, 4]])\n\n>>> m = np.asmatrix(x)\n\n>>> x[0,0] = 5\n\n>>> m\nmatrix([[5, 2],\n        [3, 4]])", "line": 66, "description": "function: defmatrix.asmatrix", "type": "function", "module-name": "defmatrix"}, {"full-name": "type_check.asscalar", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", "name": "asscalar", "column": 4, "docstring": "asscalar(a)\n\nConvert an array of size 1 to its scalar equivalent.\n\nParameters\n----------\na : ndarray\n    Input array of size 1.\n\nReturns\n-------\nout : scalar\n    Scalar representation of `a`. The output data type is the same type\n    returned by the input's `item` method.\n\nExamples\n--------\n>>> np.asscalar(np.array([24]))\n24", "line": 442, "description": "function: type_check.asscalar", "type": "function", "module-name": "type_check"}, {"full-name": "numpy.compat.asstr", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", "name": "asstr", "column": 13, "docstring": "str(object='') -> string\n\nReturn a nice string representation of the object.\nIf the argument is a string, the return value is the same object.", "line": 22, "description": "class: numpy.compat.asstr", "type": "class", "module-name": "npyio"}, {"full-name": "shape_base.atleast_1d", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/shape_base.py", "name": "atleast_1d", "column": 4, "docstring": "atleast_1d(*arys)\n\nConvert inputs to arrays with at least one dimension.\n\nScalar inputs are converted to 1-dimensional arrays, whilst\nhigher-dimensional inputs are preserved.\n\nParameters\n----------\narys1, arys2, ... : array_like\n    One or more input arrays.\n\nReturns\n-------\nret : ndarray\n    An array, or sequence of arrays, each with ``a.ndim >= 1``.\n    Copies are made only if necessary.\n\nSee Also\n--------\natleast_2d, atleast_3d\n\nExamples\n--------\n>>> np.atleast_1d(1.0)\narray([ 1.])\n\n>>> x = np.arange(9.0).reshape(3,3)\n>>> np.atleast_1d(x)\narray([[ 0.,  1.,  2.],\n       [ 3.,  4.,  5.],\n       [ 6.,  7.,  8.]])\n>>> np.atleast_1d(x) is x\nTrue\n\n>>> np.atleast_1d(1, [3, 4])\n[array([1]), array([3, 4])]", "line": 8, "description": "function: shape_base.atleast_1d", "type": "function", "module-name": "shape_base"}, {"full-name": "shape_base.atleast_2d", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/shape_base.py", "name": "atleast_2d", "column": 4, "docstring": "atleast_2d(*arys)\n\nView inputs as arrays with at least two dimensions.\n\nParameters\n----------\narys1, arys2, ... : array_like\n    One or more array-like sequences.  Non-array inputs are converted\n    to arrays.  Arrays that already have two or more dimensions are\n    preserved.\n\nReturns\n-------\nres, res2, ... : ndarray\n    An array, or tuple of arrays, each with ``a.ndim >= 2``.\n    Copies are avoided where possible, and views with two or more\n    dimensions are returned.\n\nSee Also\n--------\natleast_1d, atleast_3d\n\nExamples\n--------\n>>> np.atleast_2d(3.0)\narray([[ 3.]])\n\n>>> x = np.arange(3.0)\n>>> np.atleast_2d(x)\narray([[ 0.,  1.,  2.]])\n>>> np.atleast_2d(x).base is x\nTrue\n\n>>> np.atleast_2d(1, [1, 2], [[1, 2]])\n[array([[1]]), array([[1, 2]]), array([[1, 2]])]", "line": 60, "description": "function: shape_base.atleast_2d", "type": "function", "module-name": "shape_base"}, {"full-name": "numpy.core.atleast_3d", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", "name": "atleast_3d", "column": 31, "docstring": "atleast_3d(*arys)\n\nView inputs as arrays with at least three dimensions.\n\nParameters\n----------\narys1, arys2, ... : array_like\n    One or more array-like sequences.  Non-array inputs are converted to\n    arrays.  Arrays that already have three or more dimensions are\n    preserved.\n\nReturns\n-------\nres1, res2, ... : ndarray\n    An array, or tuple of arrays, each with ``a.ndim >= 3``.  Copies are\n    avoided where possible, and views with three or more dimensions are\n    returned.  For example, a 1-D array of shape ``(N,)`` becomes a view\n    of shape ``(1, N, 1)``, and a 2-D array of shape ``(M, N)`` becomes a\n    view of shape ``(M, N, 1)``.\n\nSee Also\n--------\natleast_1d, atleast_2d\n\nExamples\n--------\n>>> np.atleast_3d(3.0)\narray([[[ 3.]]])\n\n>>> x = np.arange(3.0)\n>>> np.atleast_3d(x).shape\n(1, 3, 1)\n\n>>> x = np.arange(12.0).reshape(4,3)\n>>> np.atleast_3d(x).shape\n(4, 3, 1)\n>>> np.atleast_3d(x).base is x\nTrue\n\n>>> for arr in np.atleast_3d([1, 2], [[1, 2]], [[[1, 2]]]):\n...     print arr, arr.shape\n...\n[[[1]\n  [2]]] (1, 2, 1)\n[[[1]\n  [2]]] (1, 2, 1)\n[[[1 2]]] (1, 1, 2)", "line": 10, "description": "function: numpy.core.atleast_3d", "type": "function", "module-name": "shape_base"}, {"full-name": "function_base.average", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "average", "column": 4, "docstring": "average(a, axis=None, weights=None, returned=False)\n\nCompute the weighted average along the specified axis.\n\nParameters\n----------\na : array_like\n    Array containing data to be averaged. If `a` is not an array, a\n    conversion is attempted.\naxis : int, optional\n    Axis along which to average `a`. If `None`, averaging is done over\n    the flattened array.\nweights : array_like, optional\n    An array of weights associated with the values in `a`. Each value in\n    `a` contributes to the average according to its associated weight.\n    The weights array can either be 1-D (in which case its length must be\n    the size of `a` along the given axis) or of the same shape as `a`.\n    If `weights=None`, then all data in `a` are assumed to have a\n    weight equal to one.\nreturned : bool, optional\n    Default is `False`. If `True`, the tuple (`average`, `sum_of_weights`)\n    is returned, otherwise only the average is returned.\n    If `weights=None`, `sum_of_weights` is equivalent to the number of\n    elements over which the average is taken.\n\n\nReturns\n-------\naverage, [sum_of_weights] : {array_type, double}\n    Return the average along the specified axis. When returned is `True`,\n    return a tuple with the average as the first element and the sum\n    of the weights as the second element. The return type is `Float`\n    if `a` is of integer type, otherwise it is of the same type as `a`.\n    `sum_of_weights` is of the same type as `average`.\n\nRaises\n------\nZeroDivisionError\n    When all weights along axis are zero. See `numpy.ma.average` for a\n    version robust to this type of error.\nTypeError\n    When the length of 1D `weights` is not the same as the shape of `a`\n    along axis.\n\nSee Also\n--------\nmean\n\nma.average : average for masked arrays -- useful if your data contains\n             \"missing\" values\n\nExamples\n--------\n>>> data = range(1,5)\n>>> data\n[1, 2, 3, 4]\n>>> np.average(data)\n2.5\n>>> np.average(range(1,11), weights=range(10,0,-1))\n4.0\n\n>>> data = np.arange(6).reshape((3,2))\n>>> data\narray([[0, 1],\n       [2, 3],\n       [4, 5]])\n>>> np.average(data, axis=1, weights=[1./4, 3./4])\narray([ 0.75,  2.75,  4.75])\n>>> np.average(data, weights=[1./4, 3./4])\nTraceback (most recent call last):\n...\nTypeError: Axis must be specified when shapes of a and weights differ.", "line": 436, "description": "function: function_base.average", "type": "function", "module-name": "function_base"}, {"full-name": "index_tricks.AxisConcatenator", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/index_tricks.py", "name": "AxisConcatenator", "column": 6, "docstring": "AxisConcatenator(self, axis=0, matrix=False, ndmin=1, trans1d=-1)\n\nTranslates slice objects to concatenation along an axis.\n\nFor detailed documentation on usage, see `r_`.", "line": 223, "description": "class: index_tricks.AxisConcatenator", "type": "class", "module-name": "index_tricks"}, {"full-name": "npyio.BagObj", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", "name": "BagObj", "column": 6, "docstring": "BagObj(self, obj)\n\nBagObj(obj)\n\nConvert attribute look-ups to getitems on the object passed in.\n\nParameters\n----------\nobj : class instance\n    Object on which attribute look-up is performed.\n\nExamples\n--------\n>>> from numpy.lib.npyio import BagObj as BO\n>>> class BagDemo(object):\n...     def __getitem__(self, key): # An instance of BagObj(BagDemo)\n...                                 # will call this method when any\n...                                 # attribute look-up is required\n...         result = \"Doesn't matter what you want, \"\n...         return result + \"you're gonna get this\"\n...\n>>> demo_obj = BagDemo()\n>>> bagobj = BO(demo_obj)\n>>> bagobj.hello_there\n\"Doesn't matter what you want, you're gonna get this\"\n>>> bagobj.I_can_be_anything\n\"Doesn't matter what you want, you're gonna get this\"", "line": 86, "description": "class: npyio.BagObj", "type": "class", "module-name": "npyio"}, {"full-name": "function_base.bartlett", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "bartlett", "column": 4, "docstring": "bartlett(M)\n\nReturn the Bartlett window.\n\nThe Bartlett window is very similar to a triangular window, except\nthat the end points are at zero.  It is often used in signal\nprocessing for tapering a signal, without generating too much\nripple in the frequency domain.\n\nParameters\n----------\nM : int\n    Number of points in the output window. If zero or less, an\n    empty array is returned.\n\nReturns\n-------\nout : array\n    The triangular window, with the maximum value normalized to one\n    (the value one appears only if the number of samples is odd), with\n    the first and last samples equal to zero.\n\nSee Also\n--------\nblackman, hamming, hanning, kaiser\n\nNotes\n-----\nThe Bartlett window is defined as\n\n.. math:: w(n) = \\frac{2}{M-1} \\left(\n          \\frac{M-1}{2} - \\left|n - \\frac{M-1}{2}\\right|\n          \\right)\n\nMost references to the Bartlett window come from the signal\nprocessing literature, where it is used as one of many windowing\nfunctions for smoothing values.  Note that convolution with this\nwindow produces linear interpolation.  It is also known as an\napodization (which means\"removing the foot\", i.e. smoothing\ndiscontinuities at the beginning and end of the sampled signal) or\ntapering function. The fourier transform of the Bartlett is the product\nof two sinc functions.\nNote the excellent discussion in Kanasewich.\n\nReferences\n----------\n.. [1] M.S. Bartlett, \"Periodogram Analysis and Continuous Spectra\",\n       Biometrika 37, 1-16, 1950.\n.. [2] E.R. Kanasewich, \"Time Sequence Analysis in Geophysics\",\n       The University of Alberta Press, 1975, pp. 109-110.\n.. [3] A.V. Oppenheim and R.W. Schafer, \"Discrete-Time Signal\n       Processing\", Prentice-Hall, 1999, pp. 468-471.\n.. [4] Wikipedia, \"Window function\",\n       http://en.wikipedia.org/wiki/Window_function\n.. [5] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,\n       \"Numerical Recipes\", Cambridge University Press, 1986, page 429.\n\n\nExamples\n--------\n>>> np.bartlett(12)\narray([ 0.        ,  0.18181818,  0.36363636,  0.54545455,  0.72727273,\n        0.90909091,  0.90909091,  0.72727273,  0.54545455,  0.36363636,\n        0.18181818,  0.        ])\n\nPlot the window and its frequency response (requires SciPy and matplotlib):\n\n>>> from numpy.fft import fft, fftshift\n>>> window = np.bartlett(51)\n>>> plt.plot(window)\n[<matplotlib.lines.Line2D object at 0x...>]\n>>> plt.title(\"Bartlett window\")\n<matplotlib.text.Text object at 0x...>\n>>> plt.ylabel(\"Amplitude\")\n<matplotlib.text.Text object at 0x...>\n>>> plt.xlabel(\"Sample\")\n<matplotlib.text.Text object at 0x...>\n>>> plt.show()\n\n>>> plt.figure()\n<matplotlib.figure.Figure object at 0x...>\n>>> A = fft(window, 2048) / 25.5\n>>> mag = np.abs(fftshift(A))\n>>> freq = np.linspace(-0.5, 0.5, len(A))\n>>> response = 20 * np.log10(mag)\n>>> response = np.clip(response, -100, 100)\n>>> plt.plot(freq, response)\n[<matplotlib.lines.Line2D object at 0x...>]\n>>> plt.title(\"Frequency response of Bartlett window\")\n<matplotlib.text.Text object at 0x...>\n>>> plt.ylabel(\"Magnitude [dB]\")\n<matplotlib.text.Text object at 0x...>\n>>> plt.xlabel(\"Normalized frequency [cycles per sample]\")\n<matplotlib.text.Text object at 0x...>\n>>> plt.axis('tight')\n(-0.5, 0.5, -100.0, ...)\n>>> plt.show()", "line": 2058, "description": "function: function_base.bartlett", "type": "function", "module-name": "function_base"}, {"full-name": "numeric.base_repr", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "base_repr", "column": 4, "docstring": "base_repr(number, base=2, padding=0)\n\nReturn a string representation of a number in the given base system.\n\nParameters\n----------\nnumber : int\n    The value to convert. Only positive values are handled.\nbase : int, optional\n    Convert `number` to the `base` number system. The valid range is 2-36,\n    the default value is 2.\npadding : int, optional\n    Number of zeros padded on the left. Default is 0 (no padding).\n\nReturns\n-------\nout : str\n    String representation of `number` in `base` system.\n\nSee Also\n--------\nbinary_repr : Faster version of `base_repr` for base 2.\n\nExamples\n--------\n>>> np.base_repr(5)\n'101'\n>>> np.base_repr(6, 5)\n'11'\n>>> np.base_repr(7, base=5, padding=3)\n'00012'\n\n>>> np.base_repr(10, base=16)\n'A'\n>>> np.base_repr(32, base=16)\n'20'", "line": 2040, "description": "function: numeric.base_repr", "type": "function", "module-name": "numeric"}, {"full-name": "numeric", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "basestring", "column": 4, "docstring": "", "line": 17, "description": "statement:     basestring = str", "type": "statement", "module-name": "numeric"}, {"full-name": "lib", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", "name": "bench", "column": 0, "docstring": "", "line": 46, "description": "statement: bench = Tester().bench", "type": "statement", "module-name": "lib"}, {"full-name": "numeric.binary_repr", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "binary_repr", "column": 4, "docstring": "binary_repr(num, width=None)\n\nReturn the binary representation of the input number as a string.\n\nFor negative numbers, if width is not given, a minus sign is added to the\nfront. If width is given, the two's complement of the number is\nreturned, with respect to that width.\n\nIn a two's-complement system negative numbers are represented by the two's\ncomplement of the absolute value. This is the most common method of\nrepresenting signed integers on computers [1]_. A N-bit two's-complement\nsystem can represent every integer in the range\n:math:`-2^{N-1}` to :math:`+2^{N-1}-1`.\n\nParameters\n----------\nnum : int\n    Only an integer decimal number can be used.\nwidth : int, optional\n    The length of the returned string if `num` is positive, the length of\n    the two's complement if `num` is negative.\n\nReturns\n-------\nbin : str\n    Binary representation of `num` or two's complement of `num`.\n\nSee Also\n--------\nbase_repr: Return a string representation of a number in the given base\n           system.\n\nNotes\n-----\n`binary_repr` is equivalent to using `base_repr` with base 2, but about 25x\nfaster.\n\nReferences\n----------\n.. [1] Wikipedia, \"Two's complement\",\n    http://en.wikipedia.org/wiki/Two's_complement\n\nExamples\n--------\n>>> np.binary_repr(3)\n'11'\n>>> np.binary_repr(-3)\n'-11'\n>>> np.binary_repr(3, width=4)\n'0011'\n\nThe two's complement is returned when the input number is negative and\nwidth is specified:\n\n>>> np.binary_repr(-3, width=4)\n'1101'", "line": 1964, "description": "function: numeric.binary_repr", "type": "function", "module-name": "numeric"}, {"full-name": "_compiled_base.bincount", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", "name": "bincount", "column": 38, "docstring": "bincount(x, weights=None, minlength=None)\n\nCount number of occurrences of each value in array of non-negative ints.\n\nThe number of bins (of size 1) is one larger than the largest value in\n`x`. If `minlength` is specified, there will be at least this number\nof bins in the output array (though it will be longer if necessary,\ndepending on the contents of `x`).\nEach bin gives the number of occurrences of its index value in `x`.\nIf `weights` is specified the input array is weighted by it, i.e. if a\nvalue ``n`` is found at position ``i``, ``out[n] += weight[i]`` instead\nof ``out[n] += 1``.\n\nParameters\n----------\nx : array_like, 1 dimension, nonnegative ints\n    Input array.\nweights : array_like, optional\n    Weights, array of the same shape as `x`.\nminlength : int, optional\n    .. versionadded:: 1.6.0\n\n    A minimum number of bins for the output array.\n\nReturns\n-------\nout : ndarray of ints\n    The result of binning the input array.\n    The length of `out` is equal to ``np.amax(x)+1``.\n\nRaises\n------\nValueError\n    If the input is not 1-dimensional, or contains elements with negative\n    values, or if `minlength` is non-positive.\nTypeError\n    If the type of the input is float or complex.\n\nSee Also\n--------\nhistogram, digitize, unique\n\nExamples\n--------\n>>> np.bincount(np.arange(5))\narray([1, 1, 1, 1, 1])\n>>> np.bincount(np.array([0, 1, 1, 3, 2, 1, 7]))\narray([1, 3, 1, 1, 0, 0, 0, 1])\n\n>>> x = np.array([0, 1, 1, 3, 2, 1, 7, 23])\n>>> np.bincount(x).size == np.amax(x)+1\nTrue\n\nThe input array needs to be of integer dtype, otherwise a\nTypeError is raised:\n\n>>> np.bincount(np.arange(5, dtype=np.float))\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\nTypeError: array cannot be safely cast to required type\n\nA possible use of ``bincount`` is to perform sums over\nvariable-size chunks of an array, using the ``weights`` keyword.\n\n>>> w = np.array([0.3, 0.5, 0.2, 0.7, 1., -0.6]) # weights\n>>> x = np.array([0, 1, 1, 2, 2, 2])\n>>> np.bincount(x,  weights=w)\narray([ 0.3,  0.7,  1.1])", "line": 27, "description": "function: _compiled_base.bincount", "type": "function", "module-name": "function_base"}, {"full-name": "numerictypes.bitname", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numerictypes.py", "name": "bitname", "column": 4, "docstring": "bitname(obj)\n\nReturn a bit-width name for a given type object", "line": 233, "description": "function: numerictypes.bitname", "type": "function", "module-name": "numerictypes"}, {"full-name": "numpy.core.umath.ufunc", "module-path": null, "name": "bitwise_and", "column": null, "docstring": "bitwise_and(x1, x2[, out])\n\nCompute the bit-wise AND of two arrays element-wise.\n\nComputes the bit-wise AND of the underlying binary representation of\nthe integers in the input arrays. This ufunc implements the C/Python\noperator ``&``.\n\nParameters\n----------\nx1, x2 : array_like\n    Only integer and boolean types are handled.\n\nReturns\n-------\nout : array_like\n    Result.\n\nSee Also\n--------\nlogical_and\nbitwise_or\nbitwise_xor\nbinary_repr :\n    Return the binary representation of the input number as a string.\n\nExamples\n--------\nThe number 13 is represented by ``00001101``.  Likewise, 17 is\nrepresented by ``00010001``.  The bit-wise AND of 13 and 17 is\ntherefore ``000000001``, or 1:\n\n>>> np.bitwise_and(13, 17)\n1\n\n>>> np.bitwise_and(14, 13)\n12\n>>> np.binary_repr(12)\n'1100'\n>>> np.bitwise_and([14,3], 13)\narray([12,  1])\n\n>>> np.bitwise_and([11,7], [4,25])\narray([0, 1])\n>>> np.bitwise_and(np.array([2,5,255]), np.array([3,14,16]))\narray([ 2,  4, 16])\n>>> np.bitwise_and([True, True], [False, True])\narray([False,  True], dtype=bool)", "line": null, "description": "instance: numpy.core.umath.ufunc", "type": "instance", "module-name": "numpy.core.umath"}, {"full-name": "numeric", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", "name": "bitwise_not", "column": 0, "docstring": "", "line": 62, "description": ............, "column": 0, "docstring": "", "line": 934, "description": "statement: \n__test_types = '?'+typecodes['AllInteger'][:-2]+typecodes['AllFloat']+'O'", "type": "statement", "module-name": "numerictypes"}, {"full-name": "numpy.version.version", "module-path": "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", "name": "__version__", "column": 37, "docstring": "str(object='') -> string\n\nReturn a nice string representation of the object.\nIf the argument is a string, the return value is the same object.", "line": 6, "description": "instance: numpy.version.version", "type": "instance", "module-name": "lib"}]}

Any idea of what could be causing the problem?

proofit404 commented 9 years ago

Python version?

silgon commented 9 years ago

Python 2.7.6

silgon commented 9 years ago

Update: in a desperate measure I uninstalled and reinstalled anaconda-mode and now it's worse I think. The same code:

import numpy as np
np.

It gives me the next error now:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 68, in <module>
    import os
  File "/usr/lib/python2.7/os.py", line 398, in <module>
    import UserDict
  File "/usr/lib/python2.7/UserDict.py", line 83, in <module>
    import _abcoll
  File "/usr/lib/python2.7/_abcoll.py", line 11, in <module>
    from abc import ABCMeta, abstractmethod
  File "abc.py", line 7
    jedi.
        ^
SyntaxError: invalid syntax

But jedi it's installed. As a note, I installed anaconda-mode from the melpa repositories.

proofit404 commented 9 years ago

Can't reproduce it. numpy_complete

proofit404 commented 9 years ago

python 2.7.10

silgon commented 9 years ago

I'm still getting the error from the Updated message when I reinstalled. I'm trying to get it to work. I cannot figure out the problem. I'll keep you posted. Let me know if you have some ideas :/

silgon commented 9 years ago

Last error message apparently was generated because a debug file I created. Ok. I reinstalled everything. So, now what happens is that the first time it tries to autocomplete, it does it well, as follows: working The problem is the second time (who knows why) the problem that I described at first appears: second_time And then it doesn't complete anymore.

silgon commented 9 years ago

You can see the whole error message here: http://paste.ubuntu.com/12530749/ (it's pretty long to be displayed here)

proofit404 commented 9 years ago

It's look familiar to some problems in the json-rpc library. Python2 http server send \r\n separator not quiet right. ^M characters may confuse json parser. Try to use python 2.7.10 and say if error disappears.

silgon commented 9 years ago

I don't want to mess up the configuration of my computer installing stuff in /usr/bin. I will check with another computer later, to see if I have the same problem :/

gillescharron commented 9 years ago

Looks similar to #122 reported on python 2.7.10

silgon commented 9 years ago

Yeah, it looks similar. Thanks @gillescharron. @proofit404 Question about json-rpc, I double checked uninstalling my version of json-rpc with pip and also the json-rpc package of emacs, and anaconda is still working. So, as far I understand anaconda-mode has it inside the package isn't it? (I didn't find it inside anaconda-mode folder though)

silgon commented 9 years ago

@gillescharron or @proofit404 do you know how to go back in the melpa installation just to give it a try? because this error didn't happen before and I've been using anaconda-mode for some time already =)

proofit404 commented 9 years ago

No idea how to rollback. Never do this before. Also you can do following experiment: go into *anaconda-response* buffer, put point on the beginnig of the last line right before first { character. Evaluate following snippet interactively M-: (json-read) RET. If it cause error remove all ^M characters from buffer and repeat first step.

silgon commented 9 years ago

This is the response:

((result . [(... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) ...]) (id . 1) (jsonrpc . "2.0"))

I don't know what it means but it cannot be good I think.....

silgon commented 9 years ago

In other matters: I'm in another computer with the old installation. Same configuration with python and it's working fine. It depends on the json-rpc and it's working fine. img

proofit404 commented 9 years ago

anaconda-mode doesn't use json-rpc library any more because it provides synchronous api only. Currently anaconda-mode work asynchronously with python server. I mention this library because I has similar issue in early days with it.

proofit404 commented 9 years ago

Also your json-read test point me dirrectly into problem. url package can't detect response body start position properly. Can you reproduce same test but put your point before ^M char?

silgon commented 9 years ago

Same response:

((result . [(... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) (... ... ... ... ... ... ... ... ...) ...]) (id . 1) (jsonrpc . "2.0"))
proofit404 commented 9 years ago

Hmm. I'll add logging of point possition. It must show us more.

xylonxu commented 9 years ago

image

xylonxu commented 9 years ago

hi, I have the same problem , python version 2.7.6

xylonxu commented 9 years ago

By the way, this is used as the python-mode layer in spacemacs.

proofit404 commented 9 years ago

@xylonxu Do you use http proxy?

xylonxu commented 9 years ago

@proofit404 oh no, thanks, that's the problem....

proofit404 commented 9 years ago

@xylonxu add 127.0.0.1 to the no_proxy environment variable.

royseto commented 9 years ago

I'm seeing this too. I'm getting anaconda-mode via the Python layer in spacemacs.

Environment:

tkossak commented 9 years ago

The same problem here ("error in process sentinel: Can't read anaconda-mode server response")

Any ideas how to fix it? I don't use any proxy.

proofit404 commented 9 years ago

@tkossak @royseto can you guys post *anaconda-mode* and *anaconda-response* buffers content?

tkossak commented 9 years ago

anaconda-response:

HTTP/1.1 200 OK
Server: BaseHTTP/0.3 Python/2.7.6
Date: Wed, 14 Oct 2015 18:48:47 GMT
Content-Length: 85

{"jsonrpc": "2.0", "id": 1, "result": {"index": 0, "params": ["x=0"], "name": "int"}}

anaconda-mode:

anaconda_mode port 9000

Thank you.

btw. i didn't have this problem before reinstalling my Linux Mint, it only happens now after fresh installation.

royseto commented 9 years ago

anaconda-response:

HTTP/1.1 200 OK
Server: BaseHTTP/0.3 Python/2.7.6
Date: Thu, 15 Oct 2015 05:26:25 GMT
Content-Length: 43

{"jsonrpc": "2.0", "id": 1, "result": null}

Note that the line termination in the anaconda-response buffer is Windows-style CRLF even though I am working on Ubuntu Linux 14.04.

anaconda-mode:

anaconda_mode port 9000

Thanks for your help.

proofit404 commented 9 years ago

Looks like a problem with older python http server.

tkossak commented 9 years ago

Can we fix it ourselves? Maybe changing python2 to python3 somewhere?

proofit404 commented 9 years ago
(setq python-shell-interpreter "python3")

This code snippet will change python used by emacs and anaconda-mode. You can try to do this if changing python version is an option for your project.

Also you can try latest python2 version (2.7.10 for example).

royseto commented 9 years ago

@proofit404 are you referring to the BaseHTTPServer that you import into service_factory here? https://github.com/proofit404/service-factory/blob/master/service_factory/providers/basehttp.py

What behavior from older versions of that package is causing this issue?

I'm on Python 2.7.6 because it's the default that comes with Ubuntu 14.04 and my main project is python2 based.

Thanks!

proofit404 commented 9 years ago

@royseto yes I mean BaseHTTPServer. I suspect Emacs may be confused with ^M and don't detect http response body beginning position correctly.

tkossak commented 9 years ago

(setq python-shell-interpreter "python3") This code snippet will change python used by emacs and anaconda-mode. You can try to do this if changing python version is an option for your project.

@proofit404 I added this to my dotspacemacs/config but the problem with anaconda persists. I noticed that as soon as i open python file the variable is changed to "ipython".

proofit404 commented 9 years ago

I suppose spacemacs add a function to the python-mode-hook which change this variable.

wangchen commented 9 years ago

@proofit404 please ignore f9eeff5, and review the 8c8559b

proofit404 commented 9 years ago

@wangchen What is the difference between those commits? :smile:

wangchen commented 9 years ago

@proofit404 awkward...

lufeihaidao commented 8 years ago

similar problem

image

emacs 24.5, python 2.7.10, 'no_proxy' set

It seems some request cannot be found.

CDN is set 8.8.8.8

proofit404 commented 8 years ago

@lufeihaidao what are the values of http_proxy, https_proxy and no_proxy variables?

lufeihaidao commented 8 years ago

@proofit404

url-proxy-services is a variable defined in `url-vars.el'.
Its value is (("no_proxy" . "\\(localhost\\|127\\.0\\.0\\.1\\)"))
Original value was nil
proofit404 commented 8 years ago

@lufeihaidao Looks fine. Can you provide *anaconda-mode* buffer content?

lufeihaidao commented 8 years ago
HTTP/1.1 200 OK
Server: nginx/0.8.53
Date: Tue, 24 Nov 2015 02:16:29 GMT
Content-Type: text/html
Content-Length: 332
Last-Modified: Wed, 22 Jul 2015 03:31:38 GMT
Connection: keep-alive
Accept-Ranges: bytes

<!Doctype html><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<script type="text/javascript">
        var h=window.location.host;
        window.location="http://search.114so.cn/search_web.html?id=407&kw=
"+h;
</script>
</body></html>

On Wed, Nov 18, 2015 at 4:25 PM, Malyshev Artem notifications@github.com wrote:

@lufeihaidao https://github.com/lufeihaidao Looks fine. Can you provide anaconda-mode buffer content.

— Reply to this email directly or view it on GitHub https://github.com/proofit404/anaconda-mode/issues/124#issuecomment-157642419 .

proofit404 commented 8 years ago

@lufeihaidao this is content of *anaconda-response*. I need *anaconda-mode* buffer content.

co-dh commented 8 years ago

I have this bug. Fixed by upgrade to emacs 24.5 (from 24.3, ubuntu's 14's default) python2.7.6 has no problem.

proofit404 commented 8 years ago

@co-dh Thanks for information! I will need to fix this bug on older emacs versions since they officially supported.

proofit404 commented 8 years ago

Fixed in the tramp branch.