_id stringlengths 5 9 | text stringlengths 5 385k | title stringclasses 1
value |
|---|---|---|
doc_3000 |
Tuple of bytes steps in each dimension. | |
doc_3001 | # Simple module for demonstration
class MyModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.param = torch.nn.Parameter(torch.rand(3, 4))
self.linear = torch.nn.Linear(4, 5)
def forward(self, x):
return self.linear(x + self.param).clamp(min=0.0, max=1.0)
modul... | |
doc_3002 | class sklearn.manifold.Isomap(*, n_neighbors=5, n_components=2, eigen_solver='auto', tol=0, max_iter=None, path_method='auto', neighbors_algorithm='auto', n_jobs=None, metric='minkowski', p=2, metric_params=None) [source]
Isomap Embedding Non-linear dimensionality reduction through Isometric Mapping Read more in the ... | |
doc_3003 | Called when Expat is done parsing the document type declaration. This requires Expat version 1.2 or newer. | |
doc_3004 |
Compute the angle of the frequency spectrum (wrapped phase spectrum) of x. Data is padded to a length of pad_to and the windowing function window is applied to the signal. Parameters
x1-D array or sequence
Array or sequence containing the data
Fsfloat, default: 2
The sampling frequency (samples per time uni... | |
doc_3005 | This function checks if all input and other satisfy the condition: ∣input−other∣≤atol+rtol×∣other∣\lvert \text{input} - \text{other} \rvert \leq \texttt{atol} + \texttt{rtol} \times \lvert \text{other} \rvert
elementwise, for all elements of input and other. The behaviour of this function is analogous to numpy.allcl... | |
doc_3006 | The version number as a string, with any whitespace and/or comments removed. | |
doc_3007 | Current column number in the parser input. | |
doc_3008 |
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Estimator parameters. Returns... | |
doc_3009 |
If value is not already a number or sequence of numbers, convert it with date2num. The unit and axis arguments are not used. | |
doc_3010 | Sleep for ms milliseconds. | |
doc_3011 | Change if autograd should record operations on parameters in this module. This method sets the parameters’ requires_grad attributes in-place. This method is helpful for freezing part of the module for finetuning or training parts of a model individually (e.g., GAN training). Parameters
requires_grad (bool) – whether ... | |
doc_3012 | Return True if the queue is empty, False otherwise. If empty() returns True it doesn’t guarantee that a subsequent call to put() will not block. Similarly, if empty() returns False it doesn’t guarantee that a subsequent call to get() will not block. | |
doc_3013 |
Complex-conjugate all elements. Refer to numpy.conjugate for full documentation. See also numpy.conjugate
equivalent function | |
doc_3014 |
Estimate model parameters with the EM algorithm. The method fits the model n_init times and sets the parameters with which the model has the largest likelihood or lower bound. Within each trial, the method iterates between E-step and M-step for max_iter times until the change of likelihood or lower bound is less than... | |
doc_3015 |
Evaluate a 2-D HermiteE series on the Cartesian product of x and y. This function returns the values: \[p(a,b) = \sum_{i,j} c_{i,j} * H_i(a) * H_j(b)\] where the points (a, b) consist of all pairs formed by taking a from x and b from y. The resulting points form a grid with x in the first dimension and y in the seco... | |
doc_3016 | Loads a macro (or variable) a template exports. This can be used to invoke a macro from within Python code. If you for example have a template named _cider.html with the following contents: {% macro hello(name) %}Hello {{ name }}!{% endmacro %}
You can access this from Python code like this: hello = get_template_attri... | |
doc_3017 | See Migration guide for more details. tf.compat.v1.raw_ops.RetrieveTPUEmbeddingRMSPropParametersGradAccumDebug
tf.raw_ops.RetrieveTPUEmbeddingRMSPropParametersGradAccumDebug(
num_shards, shard_id, table_id=-1, table_name='', config='',
name=None
)
An op that retrieves optimization parameters from embedding t... | |
doc_3018 |
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | |
doc_3019 |
Compute the convex hull image of individual objects in a binary image. The convex hull is the set of pixels included in the smallest convex polygon that surround all white pixels in the input image. Parameters
image(M, N) ndarray
Binary input image.
connectivity{1, 2}, int, optional
Determines the neighbors... | |
doc_3020 | All following arguments are optional and can be accessed as instance attributes as well. name is the pathname of the archive. name may be a path-like object. It can be omitted if fileobj is given. In this case, the file object’s name attribute is used if it exists. mode is either 'r' to read from an existing archive, '... | |
doc_3021 |
Bases: object PDF operator object. op
pdfRepr()[source] | |
doc_3022 |
Set the parameters of this kernel. The method works on simple kernels as well as on nested kernels. The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Returns
self | |
doc_3023 |
Add a horizontal line across the axis. Parameters
yfloat, default: 0
y position in data coordinates of the horizontal line.
xminfloat, default: 0
Should be between 0 and 1, 0 being the far left of the plot, 1 the far right of the plot.
xmaxfloat, default: 1
Should be between 0 and 1, 0 being the far lef... | |
doc_3024 | Wide char variant of getch(), returning a Unicode value. | |
doc_3025 | tf.compat.v1.nn.ctc_loss_v2(
labels, logits, label_length, logit_length, logits_time_major=True, unique=None,
blank_index=None, name=None
)
This op implements the CTC loss as presented in (Graves et al., 2006). Notes: Same as the "Classic CTC" in TensorFlow 1.x's tf.compat.v1.nn.ctc_loss setting of preprocess... | |
doc_3026 |
Returns a copy of the calling offset object with n=1 and all other attributes equal. | |
doc_3027 | Returns a date object containing the first day of the month before the date provided. This function can also return None or raise an Http404 exception, depending on the values of allow_empty and allow_future. | |
doc_3028 |
Set the pick radius used for containment tests. Parameters
prfloat
Pick radius, in points. | |
doc_3029 |
Find the product of two polynomials. Note This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in numpy.polynomial is preferred. A summary of the differences can be found in the transition guide. Finds the polynomial resulting from the multiplication of the two input polynomi... | |
doc_3030 | See Migration guide for more details. tf.compat.v1.config.experimental.set_memory_growth
tf.config.experimental.set_memory_growth(
device, enable
)
If memory growth is enabled for a PhysicalDevice, the runtime initialization will not allocate all memory on the device. Memory growth cannot be configured on a Phys... | |
doc_3031 | Element-wise arctangent of inputi/otheri\text{input}_{i} / \text{other}_{i} with consideration of the quadrant. Returns a new tensor with the signed angles in radians between vector (otheri,inputi)(\text{other}_{i}, \text{input}_{i}) and vector (1,0)(1, 0) . (Note that otheri\text{other}_{i} , the second parameter, i... | |
doc_3032 | 'blogs.blog': lambda o: "/blogs/%s/" % o.slug,
'news.story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug),
}
The model name used in this setting should be all lowercase, regardless of the case of the actual model class name. ADMINS Default: [] (Empty list) A list of all the people who get code error noti... | |
doc_3033 |
Return whether arbitrary affine transformations in draw_image() are supported (True for most vector backends). | |
doc_3034 |
Return the text bounds as (x, y, width, height) in table coordinates. | |
doc_3035 | Like Flask.before_request(). Such a function is executed before each request, even if outside of a blueprint. Parameters
f (Callable[[], None]) – Return type
Callable[[], None] | |
doc_3036 |
Generate isotropic Gaussian blobs for clustering. Read more in the User Guide. Parameters
n_samplesint or array-like, default=100
If int, it is the total number of points equally divided among clusters. If array-like, each element of the sequence indicates the number of samples per cluster. Changed in version ... | |
doc_3037 | Gets the element attribute named key. Returns the attribute value, or default if the attribute was not found. | |
doc_3038 | Computes the Kaiser window with window length window_length and shape parameter beta. Let I_0 be the zeroth order modified Bessel function of the first kind (see torch.i0()) and N = L - 1 if periodic is False and L if periodic is True, where L is the window_length. This function computes: outi=I0(β1−(i−N/2N/2)2)/I0(β)... | |
doc_3039 |
Compute the ExtensionArray of unique values. Returns
uniques:ExtensionArray | |
doc_3040 | class sklearn.gaussian_process.kernels.RBF(length_scale=1.0, length_scale_bounds=1e-05, 100000.0) [source]
Radial-basis function kernel (aka squared-exponential kernel). The RBF kernel is a stationary kernel. It is also known as the “squared exponential” kernel. It is parameterized by a length scale parameter \(l>0\)... | |
doc_3041 | operator.__pos__(obj)
Return obj positive (+obj). | |
doc_3042 | tf.profiler.experimental.start(
logdir, options=None
)
Args
logdir Profiling results log directory.
options ProfilerOptions namedtuple to specify miscellaneous profiler options. See example usage below.
Raises
AlreadyExistsError If a profiling session is already running. Example usage... | |
doc_3043 | Compares fromlines and tolines (lists of strings) and returns a string which is a complete HTML table showing line by line differences with inter-line and intra-line changes highlighted. The arguments for this method are the same as those for the make_file() method. | |
doc_3044 | See Migration guide for more details. tf.compat.v1.linalg.LinearOperatorLowRankUpdate
tf.linalg.LinearOperatorLowRankUpdate(
base_operator, u, diag_update=None, v=None, is_diag_update_positive=None,
is_non_singular=None, is_self_adjoint=None, is_positive_definite=None,
is_square=None, name='LinearOperator... | |
doc_3045 | See torch.bitwise_or() | |
doc_3046 | Alias for GEOSGeometry.json. | |
doc_3047 | Return a list of the DocTests that are defined by obj’s docstring, or by any of its contained objects’ docstrings. The optional argument name specifies the object’s name; this name will be used to construct names for the returned DocTests. If name is not specified, then obj.__name__ is used. The optional parameter modu... | |
doc_3048 | Create a hard link pointing to src named dst. This function can support specifying src_dir_fd and/or dst_dir_fd to supply paths relative to directory descriptors, and not following symlinks. Raises an auditing event os.link with arguments src, dst, src_dir_fd, dst_dir_fd. Availability: Unix, Windows. Changed in versio... | |
doc_3049 | sklearn.model_selection.cross_validate(estimator, X, y=None, *, groups=None, scoring=None, cv=None, n_jobs=None, verbose=0, fit_params=None, pre_dispatch='2*n_jobs', return_train_score=False, return_estimator=False, error_score=nan) [source]
Evaluate metric(s) by cross-validation and also record fit/score times. Read... | |
doc_3050 |
The degree of the series. New in version 1.5.0. Returns
degreeint
Degree of the series, one less than the number of coefficients. | |
doc_3051 |
Return a string representation of data. Note This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in squ... | |
doc_3052 | Set the “From ” line to from_, which should be specified without a leading “From ” or trailing newline. For convenience, time_ may be specified and will be formatted appropriately and appended to from_. If time_ is specified, it should be a time.struct_time instance, a tuple suitable for passing to time.strftime(), or ... | |
doc_3053 | A dictionary-like object containing all uploaded files. Each key in FILES is the name from the <input type="file" name="">. Each value in FILES is an UploadedFile. See Managing files for more information. FILES will only contain data if the request method was POST and the <form> that posted to the request had enctype="... | |
doc_3054 | os.CLD_KILLED
os.CLD_DUMPED
os.CLD_TRAPPED
os.CLD_STOPPED
os.CLD_CONTINUED
These are the possible values for si_code in the result returned by waitid(). Availability: Unix. New in version 3.3. Changed in version 3.9: Added CLD_KILLED and CLD_STOPPED values. | |
doc_3055 | Resolve a relative module name to an absolute one. If name has no leading dots, then name is simply returned. This allows for usage such as importlib.util.resolve_name('sys', __spec__.parent) without doing a check to see if the package argument is needed. ImportError is raised if name is a relative module name but pack... | |
doc_3056 | finds the average color of a surface average_color(Surface, Rect = None) -> Color Finds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color. | |
doc_3057 | Like Flask.errorhandler() but for a blueprint. This handler is used for all requests, even if outside of the blueprint. Parameters
code (Union[Type[Exception], int]) – Return type
Callable | |
doc_3058 | Returns the slope of the least-squares-fit linear equation determined by the (x, y) pairs as a float, or default if there aren’t any matching rows. | |
doc_3059 | Dictionary mapping field names to default values. >>> Account = namedtuple('Account', ['type', 'balance'], defaults=[0])
>>> Account._field_defaults
{'balance': 0}
>>> Account('premium')
Account(type='premium', balance=0) | |
doc_3060 | A form used in the admin interface to change a user’s information and permissions. | |
doc_3061 |
Compute the inverse sine of x. Return the “principal value” (for a description of this, see numpy.arcsin) of the inverse sine of x. For real x such that abs(x) <= 1, this is a real number in the closed interval \([-\pi/2, \pi/2]\). Otherwise, the complex principle value is returned. Parameters
xarray_like or scal... | |
doc_3062 | A data structure of functions to call to modify the keyword arguments passed to the view function, in the format {scope: [functions]}. The scope key is the name of a blueprint the functions are active for, or None for all requests. To register a function, use the url_value_preprocessor() decorator. This data structure ... | |
doc_3063 |
The real part of the array. See also numpy.real
equivalent function Examples >>> x = np.sqrt([1+0j, 0+1j])
>>> x.real
array([ 1. , 0.70710678])
>>> x.real.dtype
dtype('float64') | |
doc_3064 | tf.image.resize(
images, size, method=ResizeMethod.BILINEAR, preserve_aspect_ratio=False,
antialias=False, name=None
)
Resized images will be distorted if their original aspect ratio is not the same as size. To avoid distortions see tf.image.resize_with_pad.
image = tf.constant([
[1,0,0,0,0],
[0,1,0,0,0],
... | |
doc_3065 | See Migration guide for more details. tf.compat.v1.raw_ops.NonSerializableDataset
tf.raw_ops.NonSerializableDataset(
input_dataset, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A lis... | |
doc_3066 | In-place version of sqrt() | |
doc_3067 |
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | |
doc_3068 |
Align the ylabels of subplots in the same subplot column if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. If a label is on the left, it is aligned with labels on Axes that also have their label on the left and that h... | |
doc_3069 | Return the native integral Thread ID of the current thread assigned by the kernel. This is a non-negative integer. Its value may be used to uniquely identify this particular thread system-wide (until the thread terminates, after which the value may be recycled by the OS). Availability: Windows, FreeBSD, Linux, macOS, O... | |
doc_3070 | Parse a cookie from a string or WSGI environ. The same key can be provided multiple times, the values are stored in-order. The default MultiDict will have the first value first, and all values can be retrieved with MultiDict.getlist(). Parameters
header (Optional[Union[WSGIEnvironment, str, bytes]]) – The cookie he... | |
doc_3071 | The DirTree widget displays a tree view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory. | |
doc_3072 |
Provide useful information, important for bug reports. It comprises info about hosting operation system, pandas version, and versions of other installed relative packages. Parameters
as_json:str or bool, default False
If False, outputs info in a human readable form to the console. If str, it will be considered... | |
doc_3073 | Move the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to display different parts of the parent window at the same physical position on the screen. | |
doc_3074 | Return a file-like object that can be used as a temporary storage area. The file is created securely, using the same rules as mkstemp(). It will be destroyed as soon as it is closed (including an implicit close when the object is garbage collected). Under Unix, the directory entry for the file is either not created at ... | |
doc_3075 | Sends an email to the user. If from_email is None, Django uses the DEFAULT_FROM_EMAIL. Any **kwargs are passed to the underlying send_mail() call. | |
doc_3076 |
Compute the logarithm base 10 of x. Return the “principal value” (for a description of this, see numpy.log10) of \(log_{10}(x)\). For real x > 0, this is a real number (log10(0) returns -inf and log10(np.inf) returns inf). Otherwise, the complex principle value is returned. Parameters
xarray_like or scalar
The ... | |
doc_3077 |
Impute all missing values in X. Parameters
X{array-like, sparse matrix}, shape (n_samples, n_features)
The input data to complete. | |
doc_3078 |
[Deprecated] Notes Deprecated since version 3.4: | |
doc_3079 | A First In First Out scheduling policy. | |
doc_3080 | load and play a sound sound.main(file_path=None) -> None Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. If provided, use the audio file 'file_path', otherwise use a default file. sound.py optional command line argument: an audio file | |
doc_3081 | The network address for the network. The network address and the prefix length together uniquely define a network. | |
doc_3082 | Return struct.calcsize() for nP{fmt}0n or, if gettotalrefcount exists, 2PnP{fmt}0P. | |
doc_3083 |
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters
Xarray-like of shape (n_samples, n_features)
Training set.
yignored
Returns
Xtsparse matrix of shape (n_samples, n_samples)
Xt[i, j] is assigned the weight... | |
doc_3084 | Appends an item to the internal list associated with key. | |
doc_3085 | Finishes feeding data to the parser. Returns the result of calling the close() method of the target passed during construction; by default, this is the toplevel document element. | |
doc_3086 | The name of the field on which you’d like to filter the relation. | |
doc_3087 |
An ExtensionDtype for int8 integer data. Changed in version 1.0.0: Now uses pandas.NA as its missing value, rather than numpy.nan. Attributes
None Methods
None | |
doc_3088 |
Display a collection of images. Parameters
icImageCollection
Collection to display.
pluginstr
Name of plugin to use. By default, the different plugins are tried until a suitable candidate is found. Other Parameters
plugin_argskeywords
Passed to the given plugin. | |
doc_3089 |
Alias for get_color. | |
doc_3090 |
Compute Area Under the Receiver Operating Characteristic Curve (ROC AUC) from prediction scores. Note: this implementation can be used with binary, multiclass and multilabel classification, but some restrictions apply (see Parameters). Read more in the User Guide. Parameters
y_truearray-like of shape (n_samples,)... | |
doc_3091 | Return a string representing the date in ISO 8601 format, YYYY-MM-DD: >>> from datetime import date
>>> date(2002, 12, 4).isoformat()
'2002-12-04'
This is the inverse of date.fromisoformat(). | |
doc_3092 |
Set the hatching pattern. hatch can be one of: / - diagonal hatching
\ - back diagonal
| - vertical
- - horizontal
+ - crossed
x - crossed diagonal
o - small circle
O - large circle
. - dots
* - stars
Letters can be combined, in which case all the specified hatchings are done. If same letter repe... | |
doc_3093 |
Return the shortest path length from source to all reachable nodes. Returns a dictionary of shortest path lengths keyed by target. Parameters
graph{sparse matrix, ndarray} of shape (n, n)
Adjacency matrix of the graph. Sparse matrix of format LIL is preferred.
sourceint
Starting node for path.
cutoffint, ... | |
doc_3094 |
The transposed array. Same as self.transpose(). See also transpose
Examples >>> x = np.array([[1.,2.],[3.,4.]])
>>> x
array([[ 1., 2.],
[ 3., 4.]])
>>> x.T
array([[ 1., 3.],
[ 2., 4.]])
>>> x = np.array([1.,2.,3.,4.])
>>> x
array([ 1., 2., 3., 4.])
>>> x.T
array([ 1., 2., 3., 4.]) | |
doc_3095 | sklearn.inspection.permutation_importance(estimator, X, y, *, scoring=None, n_repeats=5, n_jobs=None, random_state=None, sample_weight=None) [source]
Permutation importance for feature evaluation [BRE]. The estimator is required to be a fitted estimator. X can be the data set used to train the estimator or a hold-out... | |
doc_3096 | When specified, display the first failing example in each doctest, but suppress output for all remaining examples. This will prevent doctest from reporting correct examples that break because of earlier failures; but it might also hide incorrect examples that fail independently of the first failure. When REPORT_ONLY_FI... | |
doc_3097 |
Return Integer division of series and other, element-wise (binary operator rfloordiv). Equivalent to other // series, but with support to substitute a fill_value for missing data in either one of the inputs. Parameters
other:Series or scalar value
fill_value:None or float value, default None (NaN)
Fill existi... | |
doc_3098 |
Transform data to polynomial features Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The data to transform, row by row. Prefer CSR over CSC for sparse input (for speed), but CSC is required if the degree is 4 or higher. If the degree is less than 4 and the input format is CSC, it will ... | |
doc_3099 |
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.