neulab/docprompting-conala huggingface dataset:
numpy.distutils.misc_util.dict_append(d, **kws)[source]
numpy.distutils.misc_util.exec_mod_from_location(modname, modfile)[source]
 
Use importlib machinery to import a module modname from the file modfile. Depending on the spec.loader, the module may not be registered in sys.modules.
numpy.distutils.misc_util.filter_sources(sources)[source]
 
Return four lists of filenames containing C, C++, Fortran, and Fortran 90 module sources, respectively.
numpy.distutils.misc_util.generate_config_py(target)[source]
 
Generate config.py file containing system_info information used during building the package.  Usage:

config[‘py_modules’].append((packagename, ‘__config__’,generate_config_py))
numpy.distutils.misc_util.get_cmd(cmdname, _cache={})[source]
numpy.distutils.misc_util.get_ext_source_files(ext)[source]
numpy.distutils.misc_util.get_frame(level=0)[source]
 
Return frame object from call stack with given level.
numpy.distutils.misc_util.get_info(pkgname, dirs=None)[source]
 
Return an info dict for a given C library. The info dict contains the necessary options to use the C library.  Parameters 
 
pkgnamestr


Name of the package (should match the name of the .ini file, without the extension, e.g. foo for the file foo.ini).  
dirssequence, optional


If given, should be a sequence of additional directories where to look for npy-pkg-config files. Those directories are searched prior to the NumPy directory.    Returns 
 
infodict


The dictionary with build information.    Raises 
 PkgNotFound

If the package is not found.      See also  
Configuration.add_npy_pkg_config, Configuration.add_installed_library

get_pkg_info
  Examples To get the necessary information for the npymath library from NumPy: >>> npymath_info = np.distutils.misc_util.get_info('npymath')
>>> npymath_info                                    
{'define_macros': [], 'libraries': ['npymath'], 'library_dirs':
['.../numpy/core/lib'], 'include_dirs': ['.../numpy/core/include']}
 This info dict can then be used as input to a Configuration instance: config.add_extension('foo', sources=['foo.c'], extra_info=npymath_info)
numpy.distutils.misc_util.get_language(sources)[source]
 
Determine language value (c,f77,f90) from sources
numpy.distutils.misc_util.get_lib_source_files(lib)[source]
numpy.distutils.misc_util.get_mathlibs(path=None)[source]
 
Return the MATHLIB line from numpyconfig.h
numpy.distutils.misc_util.get_num_build_jobs()[source]
 
Get number of parallel build jobs set by the –parallel command line argument of setup.py If the command did not receive a setting the environment variable NPY_NUM_BUILD_JOBS is checked. If that is unset, return the number of processors on the system, with a maximum of 8 (to prevent overloading the system if there a lot of CPUs).  Returns 
 
outint


number of parallel jobs that can be run
numpy.distutils.misc_util.get_pkg_info(pkgname, dirs=None)[source]
 
Return library info for the given package.  Parameters 
 
pkgnamestr


Name of the package (should match the name of the .ini file, without the extension, e.g. foo for the file foo.ini).  
dirssequence, optional


If given, should be a sequence of additional directories where to look for npy-pkg-config files. Those directories are searched prior to the NumPy directory.    Returns 
 
pkginfoclass instance


The LibraryInfo instance containing the build information.    Raises 
 PkgNotFound

If the package is not found.      See also  
Configuration.add_npy_pkg_config, Configuration.add_installed_library

get_info
numpy.distutils.misc_util.gpaths(paths, local_path='', include_non_existing=True)[source]
 
Apply glob to paths and prepend local_path if needed.
numpy.distutils.misc_util.has_cxx_sources(sources)[source]
 
Return True if sources contains C++ files
numpy.distutils.misc_util.has_f_sources(sources)[source]
 
Return True if sources contains Fortran files
numpy.distutils.misc_util.is_local_src_dir(directory)[source]
 
Return true if directory is local directory.
numpy.distutils.misc_util.mingw32()[source]
 
Return true when using mingw32 environment.
numpy.distutils.misc_util.minrelpath(path)[source]
 
Resolve  and ‘.’ from path.
numpy.distutils.misc_util.njoin(*path)[source]
 
Join two or more pathname components + - convert a /-separated pathname to one using the OS’s path separator. - resolve  and  from path. Either passing n arguments as in njoin(‘a’,’b’), or a sequence of n names as in njoin([‘a’,’b’]) is handled, or a mixture of such arguments.
numpy.distutils.misc_util.sanitize_cxx_flags(cxxflags)[source]
 
Some flags are valid for C but not C++. Prune them.
numpy.divide   numpy.divide(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'true_divide'>
 
Returns a true division of the inputs, element-wise. Unlike ‘floor division’, true division adjusts the output type to present the best answer, regardless of input types.  Parameters 
 
x1array_like


Dividend array.  
x2array_like


Divisor array. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).  
outndarray, None, or tuple of ndarray and None, optional


A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.  
wherearray_like, optional


This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default out=None, locations within it where the condition is False will remain uninitialized.  **kwargs

For other keyword-only arguments, see the ufunc docs.    Returns 
 
outndarray or scalar


This is a scalar if both x1 and x2 are scalars.     Notes In Python, // is the floor division operator and / the true division operator. The true_divide(x1, x2) function is equivalent to true division in Python. Examples >>> x = np.arange(5)
>>> np.true_divide(x, 4)
array([ 0.  ,  0.25,  0.5 ,  0.75,  1.  ])
 >>> x/4
array([ 0.  ,  0.25,  0.5 ,  0.75,  1.  ])
 >>> x//4
array([0, 0, 0, 0, 1])
 The / operator can be used as a shorthand for np.true_divide on ndarrays. >>> x = np.arange(5)
>>> x / 4
array([0.  , 0.25, 0.5 , 0.75, 1.  ])
numpy.divmod   numpy.divmod(x1, x2, [out1, out2, ]/, [out=(None, None), ]*, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'divmod'>
 
Return element-wise quotient and remainder simultaneously.  New in version 1.13.0.  np.divmod(x, y) is equivalent to (x // y, x % y), but faster because it avoids redundant work. It is used to implement the Python built-in function divmod on NumPy arrays.  Parameters 
 
x1array_like


Dividend array.  
x2array_like


Divisor array. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).  
outndarray, None, or tuple of ndarray and None, optional


A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.  
wherearray_like, optional


This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default out=None, locations within it where the condition is False will remain uninitialized.  **kwargs

For other keyword-only arguments, see the ufunc docs.    Returns 
 
out1ndarray


Element-wise quotient resulting from floor division. This is a scalar if both x1 and x2 are scalars.  
out2ndarray


Element-wise remainder from floor division. This is a scalar if both x1 and x2 are scalars.      See also  floor_divide

Equivalent to Python’s // operator.  remainder

Equivalent to Python’s % operator.  modf

Equivalent to divmod(x, 1) for positive x with the return values switched.    Examples >>> np.divmod(np.arange(5), 3)
(array([0, 0, 0, 1, 1]), array([0, 1, 2, 0, 1]))
 The divmod function can be used as a shorthand for np.divmod on ndarrays. >>> x = np.arange(5)
>>> divmod(x, 3)
(array([0, 0, 0, 1, 1]), array([0, 1, 2, 0, 1]))
numpy.dot   numpy.dot(a, b, out=None)
 
Dot product of two arrays. Specifically,  If both a and b are 1-D arrays, it is inner product of vectors (without complex conjugation). If both a and b are 2-D arrays, it is matrix multiplication, but using matmul or a @ b is preferred. If either a or b is 0-D (scalar), it is equivalent to multiply and using numpy.multiply(a, b) or a * b is preferred. If a is an N-D array and b is a 1-D array, it is a sum product over the last axis of a and b. 
If a is an N-D array and b is an M-D array (where M>=2), it is a sum product over the last axis of a and the second-to-last axis of b: dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])
    Parameters 
 
aarray_like


First argument.  
barray_like


Second argument.  
outndarray, optional


Output argument. This must have the exact kind that would be returned if it was not used. In particular, it must have the right type, must be C-contiguous, and its dtype must be the dtype that would be returned for dot(a,b). This is a performance feature. Therefore, if these conditions are not met, an exception is raised, instead of attempting to be flexible.    Returns 
 
outputndarray


Returns the dot product of a and b. If a and b are both scalars or both 1-D arrays then a scalar is returned; otherwise an array is returned. If out is given, then it is returned.    Raises 
 ValueError

If the last dimension of a is not the same size as the second-to-last dimension of b.      See also  vdot

Complex-conjugating dot product.  tensordot

Sum products over arbitrary axes.  einsum

Einstein summation convention.  matmul

‘@’ operator as method with out parameter.  linalg.multi_dot

Chained dot product.    Examples >>> np.dot(3, 4)
12
 Neither argument is complex-conjugated: >>> np.dot([2j, 3j], [2j, 3j])
(-13+0j)
 For 2-D arrays it is the matrix product: >>> a = [[1, 0], [0, 1]]
>>> b = [[4, 1], [2, 2]]
>>> np.dot(a, b)
array([[4, 1],
       [2, 2]])
 >>> a = np.arange(3*4*5*6).reshape((3,4,5,6))
>>> b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3))
>>> np.dot(a, b)[2,3,2,1,2,2]
499128
>>> sum(a[2,3,2,:] * b[1,2,:,2])
499128
class numpy.double(x=0, /)[source]
 
Double-precision floating-point number type, compatible with Python float and C double.  Character code 
'd'  Alias 
numpy.float_  Alias on this platform (Linux x86_64) 
numpy.float64: 64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa.
numpy.dsplit   numpy.dsplit(ary, indices_or_sections)[source]
 
Split array into multiple sub-arrays along the 3rd axis (depth). Please refer to the split documentation. dsplit is equivalent to split with axis=2, the array is always split along the third axis provided the array dimension is greater than or equal to 3.  See also  split

Split an array into multiple sub-arrays of equal size.    Examples >>> x = np.arange(16.0).reshape(2, 2, 4)
>>> x
array([[[ 0.,   1.,   2.,   3.],
        [ 4.,   5.,   6.,   7.]],
       [[ 8.,   9.,  10.,  11.],
        [12.,  13.,  14.,  15.]]])
>>> np.dsplit(x, 2)
[array([[[ 0.,  1.],
        [ 4.,  5.]],
       [[ 8.,  9.],
        [12., 13.]]]), array([[[ 2.,  3.],
        [ 6.,  7.]],
       [[10., 11.],
        [14., 15.]]])]
>>> np.dsplit(x, np.array([3, 6]))
[array([[[ 0.,   1.,   2.],
        [ 4.,   5.,   6.]],
       [[ 8.,   9.,  10.],
        [12.,  13.,  14.]]]),
 array([[[ 3.],
        [ 7.]],
       [[11.],
        [15.]]]),
array([], shape=(2, 2, 0), dtype=float64)]
numpy.dstack   numpy.dstack(tup)[source]
 
Stack arrays in sequence depth wise (along third axis). This is equivalent to concatenation along the third axis after 2-D arrays of shape (M,N) have been reshaped to (M,N,1) and 1-D arrays of shape (N,) have been reshaped to (1,N,1). Rebuilds arrays divided by dsplit. This function makes most sense for arrays with up to 3 dimensions. For instance, for pixel-data with a height (first axis), width (second axis), and r/g/b channels (third axis). The functions concatenate, stack and block provide more general stacking and concatenation operations.  Parameters 
 
tupsequence of arrays


The arrays must have the same shape along all but the third axis. 1-D or 2-D arrays must have the same shape.    Returns 
 
stackedndarray


The array formed by stacking the given arrays, will be at least 3-D.      See also  concatenate

Join a sequence of arrays along an existing axis.  stack

Join a sequence of arrays along a new axis.  block

Assemble an nd-array from nested lists of blocks.  vstack

Stack arrays in sequence vertically (row wise).  hstack

Stack arrays in sequence horizontally (column wise).  column_stack

Stack 1-D arrays as columns into a 2-D array.  dsplit

Split array along third axis.    Examples >>> a = np.array((1,2,3))
>>> b = np.array((2,3,4))
>>> np.dstack((a,b))
array([[[1, 2],
        [2, 3],
        [3, 4]]])
 >>> a = np.array([[1],[2],[3]])
>>> b = np.array([[2],[3],[4]])
>>> np.dstack((a,b))
array([[[1, 2]],
       [[2, 3]],
       [[3, 4]]])
numpy.e
 
Euler’s constant, base of natural logarithms, Napier’s constant. e = 2.71828182845904523536028747135266249775724709369995... See Also exp : Exponential function log : Natural logarithm References https://en.wikipedia.org/wiki/E_%28mathematical_constant%29
numpy.ediff1d   numpy.ediff1d(ary, to_end=None, to_begin=None)[source]
 
The differences between consecutive elements of an array.  Parameters 
 
aryarray_like


If necessary, will be flattened before the differences are taken.  
to_endarray_like, optional


Number(s) to append at the end of the returned differences.  
to_beginarray_like, optional


Number(s) to prepend at the beginning of the returned differences.    Returns 
 
ediff1dndarray


The differences. Loosely, this is ary.flat[1:] - ary.flat[:-1].      See also  
diff, gradient

  Notes When applied to masked arrays, this function drops the mask information if the to_begin and/or to_end parameters are used. Examples >>> x = np.array([1, 2, 4, 7, 0])
>>> np.ediff1d(x)
array([ 1,  2,  3, -7])
 >>> np.ediff1d(x, to_begin=-99, to_end=np.array([88, 99]))
array([-99,   1,   2, ...,  -7,  88,  99])
 The returned array is always 1D. >>> y = [[1, 2, 4], [1, 6, 24]]
>>> np.ediff1d(y)
array([ 1,  2, -3,  5, 18])
numpy.empty   numpy.empty(shape, dtype=float, order='C', *, like=None)
 
Return a new array of given shape and type, without initializing entries.  Parameters 
 
shapeint or tuple of int


Shape of the empty array, e.g., (2, 3) or 2.  
dtypedata-type, optional


Desired output data-type for the array, e.g, numpy.int8. Default is numpy.float64.  
order{‘C’, ‘F’}, optional, default: ‘C’


Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.  
likearray_like


Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__ protocol, the result will be defined by it. In this case, it ensures the creation of an array object compatible with that passed in via this argument.  New in version 1.20.0.     Returns 
 
outndarray


Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None.      See also  empty_like

Return an empty array with shape and type of input.  ones

Return a new array setting values to one.  zeros

Return a new array setting values to zero.  full

Return a new array of given shape filled with value.    Notes empty, unlike zeros, does not set the array values to zero, and may therefore be marginally faster. On the other hand, it requires the user to manually set all the values in the array, and should be used with caution. Examples >>> np.empty([2, 2])
array([[ -9.74499359e+001,   6.69583040e-309],
       [  2.13182611e-314,   3.06959433e-309]])         #uninitialized
 >>> np.empty([2, 2], dtype=int)
array([[-1073741821, -1067949133],
       [  496041986,    19249760]])                     #uninitialized
numpy.empty_like   numpy.empty_like(prototype, dtype=None, order='K', subok=True, shape=None)
 
Return a new array with the same shape and type as a given array.  Parameters 
 
prototypearray_like


The shape and data-type of prototype define these same attributes of the returned array.  
dtypedata-type, optional


Overrides the data type of the result.  New in version 1.6.0.   
order{‘C’, ‘F’, ‘A’, or ‘K’}, optional


Overrides the memory layout of the result. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if prototype is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of prototype as closely as possible.  New in version 1.6.0.   
subokbool, optional.


If True, then the newly created array will use the sub-class type of prototype, otherwise it will be a base-class array. Defaults to True.  
shapeint or sequence of ints, optional.


Overrides the shape of the result. If order=’K’ and the number of dimensions is unchanged, will try to keep order, otherwise, order=’C’ is implied.  New in version 1.17.0.     Returns 
 
outndarray


Array of uninitialized (arbitrary) data with the same shape and type as prototype.      See also  ones_like

Return an array of ones with shape and type of input.  zeros_like

Return an array of zeros with shape and type of input.  full_like

Return a new array with shape of input filled with value.  empty

Return a new uninitialized array.    Notes This function does not initialize the returned array; to do that use zeros_like or ones_like instead. It may be marginally faster than the functions that do set the array values. Examples >>> a = ([1,2,3], [4,5,6])                         # a is array-like
>>> np.empty_like(a)
array([[-1073741821, -1073741821,           3],    # uninitialized
       [          0,           0, -1073741821]])
>>> a = np.array([[1., 2., 3.],[4.,5.,6.]])
>>> np.empty_like(a)
array([[ -2.00000715e+000,   1.48219694e-323,  -2.00000572e+000], # uninitialized
       [  4.38791518e-305,  -2.00000715e+000,   4.17269252e-309]])
numpy.equal   numpy.equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'equal'>
 
Return (x1 == x2) element-wise.  Parameters 
 
x1, x2array_like


Input arrays. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).  
outndarray, None, or tuple of ndarray and None, optional


A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.  
wherearray_like, optional


This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default out=None, locations within it where the condition is False will remain uninitialized.  **kwargs

For other keyword-only arguments, see the ufunc docs.    Returns 
 
outndarray or scalar


Output array, element-wise comparison of x1 and x2. Typically of type bool, unless dtype=object is passed. This is a scalar if both x1 and x2 are scalars.      See also  
not_equal, greater_equal, less_equal, greater, less

  Examples >>> np.equal([0, 1, 3], np.arange(3))
array([ True,  True, False])
 What is compared are values, not types. So an int (1) and an array of length one can evaluate as True: >>> np.equal(1, np.ones(1))
array([ True])
 The == operator can be used as a shorthand for np.equal on ndarrays. >>> a = np.array([2, 4, 6])
>>> b = np.array([2, 4, 2])
>>> a == b
array([ True,  True, False])
numpy.errstate   class numpy.errstate(**kwargs)[source]
 
Context manager for floating-point error handling. Using an instance of errstate as a context manager allows statements in that context to execute with a known error handling behavior. Upon entering the context the error handling is set with seterr and seterrcall, and upon exiting it is reset to what it was before.  Changed in version 1.17.0: errstate is also usable as a function decorator, saving a level of indentation if an entire function is wrapped. See contextlib.ContextDecorator for more information.   Parameters 
 
kwargs{divide, over, under, invalid}


Keyword arguments. The valid keywords are the possible floating-point exceptions. Each keyword should have a string value that defines the treatment for the particular error. Possible values are {‘ignore’, ‘warn’, ‘raise’, ‘call’, ‘print’, ‘log’}.      See also  
seterr, geterr, seterrcall, geterrcall

  Notes For complete documentation of the types of floating-point exceptions and treatment options, see seterr. Examples >>> olderr = np.seterr(all='ignore')  # Set error handling to known state.
 >>> np.arange(3) / 0.
array([nan, inf, inf])
>>> with np.errstate(divide='warn'):
...     np.arange(3) / 0.
array([nan, inf, inf])
 >>> np.sqrt(-1)
nan
>>> with np.errstate(invalid='raise'):
...     np.sqrt(-1)
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
FloatingPointError: invalid value encountered in sqrt
 Outside the context the error handling behavior has not changed: >>> np.geterr()
{'divide': 'ignore', 'over': 'ignore', 'under': 'ignore', 'invalid': 'ignore'}
 Methods  
__call__(func) Call self as a function.
numpy.euler_gamma
 
γ = 0.5772156649015328606065120900824024310421... References https://en.wikipedia.org/wiki/Euler-Mascheroni_constant