neulab/docprompting-conala huggingface dataset:
numpy.logaddexp   numpy.logaddexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logaddexp'>
 
Logarithm of the sum of exponentiations of the inputs. Calculates log(exp(x1) + exp(x2)). This function is useful in statistics where the calculated probabilities of events may be so small as to exceed the range of normal floating point numbers. In such cases the logarithm of the calculated probability is stored. This function allows adding probabilities stored in such a fashion.  Parameters 
 
x1, x2array_like


Input values. 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 
 
resultndarray


Logarithm of exp(x1) + exp(x2). This is a scalar if both x1 and x2 are scalars.      See also  logaddexp2

Logarithm of the sum of exponentiations of inputs in base 2.    Notes  New in version 1.3.0.  Examples >>> prob1 = np.log(1e-50)
>>> prob2 = np.log(2.5e-50)
>>> prob12 = np.logaddexp(prob1, prob2)
>>> prob12
-113.87649168120691
>>> np.exp(prob12)
3.5000000000000057e-50
numpy.logaddexp2   numpy.logaddexp2(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logaddexp2'>
 
Logarithm of the sum of exponentiations of the inputs in base-2. Calculates log2(2**x1 + 2**x2). This function is useful in machine learning when the calculated probabilities of events may be so small as to exceed the range of normal floating point numbers. In such cases the base-2 logarithm of the calculated probability can be used instead. This function allows adding probabilities stored in such a fashion.  Parameters 
 
x1, x2array_like


Input values. 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 
 
resultndarray


Base-2 logarithm of 2**x1 + 2**x2. This is a scalar if both x1 and x2 are scalars.      See also  logaddexp

Logarithm of the sum of exponentiations of the inputs.    Notes  New in version 1.3.0.  Examples >>> prob1 = np.log2(1e-50)
>>> prob2 = np.log2(2.5e-50)
>>> prob12 = np.logaddexp2(prob1, prob2)
>>> prob1, prob2, prob12
(-166.09640474436813, -164.77447664948076, -164.28904982231052)
>>> 2**prob12
3.4999999999999914e-50
numpy.logical_and   numpy.logical_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_and'>
 
Compute the truth value of x1 AND 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 
 
yndarray or bool


Boolean result of the logical AND operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars.      See also  
logical_or, logical_not, logical_xor

bitwise_and
  Examples >>> np.logical_and(True, False)
False
>>> np.logical_and([True, False], [False, False])
array([False, False])
 >>> x = np.arange(5)
>>> np.logical_and(x>1, x<4)
array([False, False,  True,  True, False])
 The & operator can be used as a shorthand for np.logical_and on boolean ndarrays. >>> a = np.array([True, False])
>>> b = np.array([False, False])
>>> a & b
array([False, False])
numpy.logical_not   numpy.logical_not(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_not'>
 
Compute the truth value of NOT x element-wise.  Parameters 
 
xarray_like


Logical NOT is applied to the elements of x.  
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 
 
ybool or ndarray of bool


Boolean result with the same shape as x of the NOT operation on elements of x. This is a scalar if x is a scalar.      See also  
logical_and, logical_or, logical_xor

  Examples >>> np.logical_not(3)
False
>>> np.logical_not([True, False, 0, 1])
array([False,  True,  True, False])
 >>> x = np.arange(5)
>>> np.logical_not(x<3)
array([False, False, False,  True,  True])
numpy.logical_or   numpy.logical_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_or'>
 
Compute the truth value of x1 OR x2 element-wise.  Parameters 
 
x1, x2array_like


Logical OR is applied to the elements of x1 and x2. 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 
 
yndarray or bool


Boolean result of the logical OR operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars.      See also  
logical_and, logical_not, logical_xor

bitwise_or
  Examples >>> np.logical_or(True, False)
True
>>> np.logical_or([True, False], [False, False])
array([ True, False])
 >>> x = np.arange(5)
>>> np.logical_or(x < 1, x > 3)
array([ True, False, False, False,  True])
 The | operator can be used as a shorthand for np.logical_or on boolean ndarrays. >>> a = np.array([True, False])
>>> b = np.array([False, False])
>>> a | b
array([ True, False])
numpy.logical_xor   numpy.logical_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_xor'>
 
Compute the truth value of x1 XOR x2, element-wise.  Parameters 
 
x1, x2array_like


Logical XOR is applied to the elements of x1 and x2. 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 
 
ybool or ndarray of bool


Boolean result of the logical XOR operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars.      See also  
logical_and, logical_or, logical_not, bitwise_xor

  Examples >>> np.logical_xor(True, False)
True
>>> np.logical_xor([True, True, False, False], [True, False, True, False])
array([False,  True,  True, False])
 >>> x = np.arange(5)
>>> np.logical_xor(x < 1, x > 3)
array([ True, False, False, False,  True])
 Simple example showing support of broadcasting >>> np.logical_xor(0, np.eye(2))
array([[ True, False],
       [False,  True]])
numpy.logspace   numpy.logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None, axis=0)[source]
 
Return numbers spaced evenly on a log scale. In linear space, the sequence starts at base ** start (base to the power of start) and ends with base ** stop (see endpoint below).  Changed in version 1.16.0: Non-scalar start and stop are now supported.   Parameters 
 
startarray_like


base ** start is the starting value of the sequence.  
stoparray_like


base ** stop is the final value of the sequence, unless endpoint is False. In that case, num + 1 values are spaced over the interval in log-space, of which all but the last (a sequence of length num) are returned.  
numinteger, optional


Number of samples to generate. Default is 50.  
endpointboolean, optional


If true, stop is the last sample. Otherwise, it is not included. Default is True.  
basearray_like, optional


The base of the log space. The step size between the elements in ln(samples) / ln(base) (or log_base(samples)) is uniform. Default is 10.0.  
dtypedtype


The type of the output array. If dtype is not given, the data type is inferred from start and stop. The inferred type will never be an integer; float is chosen even if the arguments would produce an array of integers.  
axisint, optional


The axis in the result to store the samples. Relevant only if start or stop are array-like. By default (0), the samples will be along a new axis inserted at the beginning. Use -1 to get an axis at the end.  New in version 1.16.0.     Returns 
 
samplesndarray


num samples, equally spaced on a log scale.      See also  arange

Similar to linspace, with the step size specified instead of the number of samples. Note that, when used with a float endpoint, the endpoint may or may not be included.  linspace

Similar to logspace, but with the samples uniformly distributed in linear space, instead of log space.  geomspace

Similar to logspace, but with endpoints specified directly.    Notes Logspace is equivalent to the code >>> y = np.linspace(start, stop, num=num, endpoint=endpoint)
... 
>>> power(base, y).astype(dtype)
... 
 Examples >>> np.logspace(2.0, 3.0, num=4)
array([ 100.        ,  215.443469  ,  464.15888336, 1000.        ])
>>> np.logspace(2.0, 3.0, num=4, endpoint=False)
array([100.        ,  177.827941  ,  316.22776602,  562.34132519])
>>> np.logspace(2.0, 3.0, num=4, base=2.0)
array([4.        ,  5.0396842 ,  6.34960421,  8.        ])
 Graphical illustration: >>> import matplotlib.pyplot as plt
>>> N = 10
>>> x1 = np.logspace(0.1, 1, N, endpoint=True)
>>> x2 = np.logspace(0.1, 1, N, endpoint=False)
>>> y = np.zeros(N)
>>> plt.plot(x1, y, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.plot(x2, y + 0.5, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.ylim([-0.5, 1])
(-0.5, 1)
>>> plt.show()
class numpy.longdouble[source]
 
Extended-precision floating-point number type, compatible with C long double but not necessarily with IEEE 754 quadruple-precision.  Character code 
'g'  Alias 
numpy.longfloat  Alias on this platform (Linux x86_64) 
numpy.float128: 128-bit extended-precision floating-point number type.
class numpy.longlong[source]
 
Signed integer type, compatible with C long long.  Character code 
'q'
numpy.lookfor   numpy.lookfor(what, module=None, import_modules=True, regenerate=False, output=None)[source]
 
Do a keyword search on docstrings. A list of objects that matched the search is displayed, sorted by relevance. All given keywords need to be found in the docstring for it to be returned as a result, but the order does not matter.  Parameters 
 
whatstr


String containing words to look for.  
modulestr or list, optional


Name of module(s) whose docstrings to go through.  
import_modulesbool, optional


Whether to import sub-modules in packages. Default is True.  
regeneratebool, optional


Whether to re-generate the docstring cache. Default is False.  
outputfile-like, optional


File-like object to write the output to. If omitted, use a pager.      See also  
source, info

  Notes Relevance is determined only roughly, by checking if the keywords occur in the function name, at the start of a docstring, etc. Examples >>> np.lookfor('binary representation') 
Search results for 'binary representation'
------------------------------------------
numpy.binary_repr
    Return the binary representation of the input number as a string.
numpy.core.setup_common.long_double_representation
    Given a binary dump as given by GNU od -b, look for long double
numpy.base_repr
    Return a string representation of a number in the given base system.
...
numpy.ma.masked_array   numpy.ma.masked_array[source]
 
alias of numpy.ma.core.MaskedArray
numpy.ma.masked_print_options
 
String used in lieu of missing data when a masked array is printed. By default, this string is '--'.
numpy.ma.MaskType   numpy.ma.MaskType[source]
 
alias of numpy.bool_
numpy.ma.nomask
 
Value indicating that a masked array has no invalid entry. nomask is used internally to speed up computations when the mask is not needed. It is represented internally as np.False_.
numpy.MachAr   class numpy.MachAr(float_conv=<class 'float'>, int_conv=<class 'int'>, float_to_float=<class 'float'>, float_to_str=<function MachAr.<lambda>>, title='Python floating point number')[source]
 
Diagnosing machine parameters.  Parameters 
 
float_convfunction, optional


Function that converts an integer or integer array to a float or float array. Default is float.  
int_convfunction, optional


Function that converts a float or float array to an integer or integer array. Default is int.  
float_to_floatfunction, optional


Function that converts a float array to float. Default is float. Note that this does not seem to do anything useful in the current implementation.  
float_to_strfunction, optional


Function that converts a single float to a string. Default is lambda v:'%24.16e' %v.  
titlestr, optional


Title that is printed in the string representation of MachAr.      See also  finfo

Machine limits for floating point types.  iinfo

Machine limits for integer types.    References  1 
Press, Teukolsky, Vetterling and Flannery, “Numerical Recipes in C++,” 2nd ed, Cambridge University Press, 2002, p. 31.    Attributes 
 
ibetaint


Radix in which numbers are represented.  
itint


Number of base-ibeta digits in the floating point mantissa M.  
machepint


Exponent of the smallest (most negative) power of ibeta that, added to 1.0, gives something different from 1.0  
epsfloat


Floating-point number beta**machep (floating point precision)  
negepint


Exponent of the smallest power of ibeta that, subtracted from 1.0, gives something different from 1.0.  
epsnegfloat


Floating-point number beta**negep.  
iexpint


Number of bits in the exponent (including its sign and bias).  
minexpint


Smallest (most negative) power of ibeta consistent with there being no leading zeros in the mantissa.  
xminfloat


Floating-point number beta**minexp (the smallest [in magnitude] positive floating point number with full precision).  
maxexpint


Smallest (positive) power of ibeta that causes overflow.  
xmaxfloat


(1-epsneg) * beta**maxexp (the largest [in magnitude] usable floating value).  
irndint


In range(6), information on what kind of rounding is done in addition, and on how underflow is handled.  
ngrdint


Number of ‘guard digits’ used when truncating the product of two mantissas to fit the representation.  
epsilonfloat


Same as eps.  
tinyfloat


An alias for smallest_normal, kept for backwards compatibility.  
hugefloat


Same as xmax.  
precisionfloat


- int(-log10(eps))  
resolutionfloat


- 10**(-precision)  
smallest_normalfloat


The smallest positive floating point number with 1 as leading bit in the mantissa following IEEE-754. Same as xmin.  
smallest_subnormalfloat


The smallest positive floating point number with 0 as leading bit in the mantissa following IEEE-754.
numpy.mask_indices   numpy.mask_indices(n, mask_func, k=0)[source]
 
Return the indices to access (n, n) arrays, given a masking function. Assume mask_func is a function that, for a square array a of size (n, n) with a possible offset argument k, when called as mask_func(a, k) returns a new array with zeros in certain locations (functions like triu or tril do precisely this). Then this function returns the indices where the non-zero values would be located.  Parameters 
 
nint


The returned indices will be valid to access arrays of shape (n, n).  
mask_funccallable


A function whose call signature is similar to that of triu, tril. That is, mask_func(x, k) returns a boolean array, shaped like x. k is an optional argument to the function.  
kscalar


An optional argument which is passed through to mask_func. Functions like triu, tril take a second argument that is interpreted as an offset.    Returns 
 
indicestuple of arrays.


The n arrays of indices corresponding to the locations where mask_func(np.ones((n, n)), k) is True.      See also  
triu, tril, triu_indices, tril_indices

  Notes  New in version 1.4.0.  Examples These are the indices that would allow you to access the upper triangular part of any 3x3 array: >>> iu = np.mask_indices(3, np.triu)
 For example, if a is a 3x3 array: >>> a = np.arange(9).reshape(3, 3)
>>> a
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
>>> a[iu]
array([0, 1, 2, 4, 5, 8])
 An offset can be passed also to the masking function. This gets us the indices starting on the first diagonal right of the main one: >>> iu1 = np.mask_indices(3, np.triu, 1)
 with which we now extract only three elements: >>> a[iu1]
array([1, 2, 5])
numpy.mat   numpy.mat(data, dtype=None)[source]
 
Interpret the input as a matrix. Unlike matrix, asmatrix does not make a copy if the input is already a matrix or an ndarray. Equivalent to matrix(data, copy=False).  Parameters 
 
dataarray_like


Input data.  
dtypedata-type


Data-type of the output matrix.    Returns 
 
matmatrix


data interpreted as a matrix.     Examples >>> x = np.array([[1, 2], [3, 4]])
 >>> m = np.asmatrix(x)
 >>> x[0,0] = 5
 >>> m
matrix([[5, 2],
        [3, 4]])
numpy.maximum   numpy.maximum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'maximum'>
 
Element-wise maximum of array elements. Compare two arrays and returns a new array containing the element-wise maxima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned. The latter distinction is important for complex NaNs, which are defined as at least one of the real or imaginary parts being a NaN. The net effect is that NaNs are propagated.  Parameters 
 
x1, x2array_like


The arrays holding the elements to be compared. 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 
 
yndarray or scalar


The maximum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.      See also  minimum

Element-wise minimum of two arrays, propagates NaNs.  fmax

Element-wise maximum of two arrays, ignores NaNs.  amax

The maximum value of an array along a given axis, propagates NaNs.  nanmax

The maximum value of an array along a given axis, ignores NaNs.  
fmin, amin, nanmin

  Notes The maximum is equivalent to np.where(x1 >= x2, x1, x2) when neither x1 nor x2 are nans, but it is faster and does proper broadcasting. Examples >>> np.maximum([2, 3, 4], [1, 5, 2])
array([2, 5, 4])
 >>> np.maximum(np.eye(2), [0.5, 2]) # broadcasting
array([[ 1. ,  2. ],
       [ 0.5,  2. ]])
 >>> np.maximum([np.nan, 0, np.nan], [0, np.nan, np.nan])
array([nan, nan, nan])
>>> np.maximum(np.Inf, 1)
inf
numpy.maximum_sctype   numpy.maximum_sctype(t)[source]
 
Return the scalar type of highest precision of the same kind as the input.  Parameters 
 
tdtype or dtype specifier


The input data type. This can be a dtype object or an object that is convertible to a dtype.    Returns 
 
outdtype


The highest precision data type of the same kind (dtype.kind) as t.      See also  
obj2sctype, mintypecode, sctype2char

dtype
  Examples >>> np.maximum_sctype(int)
<class 'numpy.int64'>
>>> np.maximum_sctype(np.uint8)
<class 'numpy.uint64'>
>>> np.maximum_sctype(complex)
<class 'numpy.complex256'> # may vary
 >>> np.maximum_sctype(str)
<class 'numpy.str_'>
 >>> np.maximum_sctype('i2')
<class 'numpy.int64'>
>>> np.maximum_sctype('f4')
<class 'numpy.float128'> # may vary