_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_27300
See torch.renorm()
doc_27301
A non-callable version of MagicMock. The constructor parameters have the same meaning as for MagicMock, with the exception of return_value and side_effect which have no meaning on a non-callable mock.
doc_27302
Convert coefficient matrix to sparse format. Converts the coef_ member to a scipy.sparse matrix, which for L1-regularized models can be much more memory- and storage-efficient than the usual numpy.ndarray representation. The intercept_ member is not converted. Returns self Fitted estimator. Notes For non-spar...
doc_27303
Initialize a graph with edges, name, or graph attributes. Parameters incoming_graph_datainput graph (optional, default: None) Data to initialize graph. If None (default) an empty graph is created. The data can be an edge list, or any NetworkX graph object. If the corresponding optional Python packages are insta...
doc_27304
Evaluate a 3-D polynomial at points (x, y, z). This function returns the values: \[p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * x^i * y^j * z^k\] The parameters x, y, and z are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they must have the same shape after conversion. I...
doc_27305
See Migration guide for more details. tf.compat.v1.io.decode_proto tf.io.decode_proto( bytes, message_type, field_names, output_types, descriptor_source='local://', message_format='binary', sanitize=False, name=None ) The decode_proto op extracts fields from a serialized protocol buffers message into ten...
doc_27306
repository revision of the build rev = 'a6f89747b551+' The Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release p...
doc_27307
tf.experimental.numpy.divmod( x1, x2 ) Unsupported arguments: out1, out2, out, where, casting, order, dtype, subok, signature, extobj. See the NumPy documentation for numpy.divmod.
doc_27308
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each hour. Mark every hour in byhour; byhour can be an int or sequence. Default is to tick every hour: byhour=range(24) interval is the interval between each iteration. For example, if interval=2, mark every second occurrence.
doc_27309
Fit a model to data with the RANSAC (random sample consensus) algorithm. RANSAC is an iterative algorithm for the robust estimation of parameters from a subset of inliers from the complete data set. Each iteration performs the following tasks: Select min_samples random samples from the original data and check whethe...
doc_27310
Check whether an array-like or dtype is of a DatetimeTZDtype dtype. Parameters arr_or_dtype:array-like or dtype The array-like or dtype to check. Returns boolean Whether or not the array-like or dtype is of a DatetimeTZDtype dtype. Examples >>> is_datetime64tz_dtype(object) False >>> is_datetime64tz_...
doc_27311
Escape a string. Calls escape() and ensures that for subclasses the correct type is returned. Parameters s (Any) – Return type markupsafe.Markup
doc_27312
Set the character stream (a text file) for this input source. If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.
doc_27313
Find the unique elements of an array. Returns the sorted unique elements of an array. There are three optional outputs in addition to the unique elements: the indices of the input array that give the unique values the indices of the unique array that reconstruct the input array the number of times each unique value ...
doc_27314
Return base to the power exp; if mod is present, return base to the power exp, modulo mod (computed more efficiently than pow(base, exp) % mod). The two-argument form pow(base, exp) is equivalent to using the power operator: base**exp. The arguments must have numeric types. With mixed operand types, the coercion rules ...
doc_27315
See Migration guide for more details. tf.compat.v1.raw_ops.Abs tf.raw_ops.Abs( x, name=None ) Given a tensor x, this operation returns a tensor containing the absolute value of each element in x. For example, if x is an input element and y is an output element, this operation computes \(y = |x|\). Args x ...
doc_27316
Does basic configuration for the logging system by creating a StreamHandler with a default Formatter and adding it to the root logger. The functions debug(), info(), warning(), error() and critical() will call basicConfig() automatically if no handlers are defined for the root logger. This function does nothing if the ...
doc_27317
Return a new hmac object. key is a bytes or bytearray object giving the secret key. If msg is present, the method call update(msg) is made. digestmod is the digest name, digest constructor or module for the HMAC object to use. It may be any name suitable to hashlib.new(). Despite its argument position, it is required. ...
doc_27318
Check whether the provided array or dtype is of the datetime64[ns] dtype. Parameters arr_or_dtype:array-like or dtype The array or dtype to check. Returns bool Whether or not the array or dtype is of the datetime64[ns] dtype. Examples >>> is_datetime64_ns_dtype(str) False >>> is_datetime64_ns_dtype(i...
doc_27319
tf.compat.v1.metrics.precision_at_top_k( labels, predictions_idx, k=None, class_id=None, weights=None, metrics_collections=None, updates_collections=None, name=None ) Differs from sparse_precision_at_k in that predictions must be in the form of top k class indices, whereas sparse_precision_at_k expects logits....
doc_27320
Create a new Font instance from a supported font file. Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font Argument file can be either a string representing the font's filename, a file-like object containing the font, or None; if None, a default, Pygame, font is used. Optionally, a size argument may be...
doc_27321
Creates a class object dynamically using the appropriate metaclass. The first three arguments are the components that make up a class definition header: the class name, the base classes (in order), the keyword arguments (such as metaclass). The exec_body argument is a callback that is used to populate the freshly creat...
doc_27322
Return the frequency object if it is set, otherwise None.
doc_27323
Class derived from Error. Contains no additional instance variables.
doc_27324
Apply func(self, *args, **kwargs), and return the result. Parameters func:function Function to apply to the Styler. Alternatively, a (callable, keyword) tuple where keyword is a string indicating the keyword of callable that expects the Styler. *args:optional Arguments passed to func. **kwargs:optional ...
doc_27325
See Migration guide for more details. tf.compat.v1.math.segment_min, tf.compat.v1.segment_min tf.math.segment_min( data, segment_ids, name=None ) Read the section on segmentation for an explanation of segments. Computes a tensor such that \(output_i = \min_j(data_j)\) where min is over j such that segment_ids[j]...
doc_27326
Assert the mock has been awaited with the specified calls. The await_args_list list is checked for the awaits. If any_order is false then the awaits must be sequential. There can be extra calls before or after the specified awaits. If any_order is true then the awaits can be in any order, but they must all appear in aw...
doc_27327
This criterion combines log_softmax and nll_loss in a single function. See CrossEntropyLoss for details. Parameters input (Tensor) – (N,C)(N, C) where C = number of classes or (N,C,H,W)(N, C, H, W) in case of 2D Loss, or (N,C,d1,d2,...,dK)(N, C, d_1, d_2, ..., d_K) where K≥1K \geq 1 in the case of K-dimension...
doc_27328
Returns a tensor filled with the scalar value 1, with the same size as input. torch.ones_like(input) is equivalent to torch.ones(input.size(), dtype=input.dtype, layout=input.layout, device=input.device). Warning As of 0.4, this function does not support an out keyword. As an alternative, the old torch.ones_like(input...
doc_27329
Raised when encountering a timedelta value that cannot be represented as a timedelta64[ns].
doc_27330
Initializes RPC primitives such as the local RPC agent and distributed autograd, which immediately makes the current process ready to send and receive RPCs. Parameters name (str) – a globally unique name of this node. (e.g., Trainer3, ParameterServer2, Master, Worker1) Name can only contain number, alphabet, unde...
doc_27331
Applies a 2D convolution over a quantized input signal composed of several quantized input planes. For details on input arguments, parameters, and implementation see Conv2d. Note Only zeros is supported for the padding_mode argument. Note Only torch.quint8 is supported for the input data type. Variables ~Conv...
doc_27332
The multipart headers as Headers object. This usually contains irrelevant information but in combination with custom multipart requests the raw headers might be interesting. Changelog New in version 0.6.
doc_27333
A context manager that temporarily changes the current working directory to path and yields the directory. If quiet is False, the context manager raises an exception on error. Otherwise, it issues only a warning and keeps the current working directory the same.
doc_27334
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) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outputs), default=None Target values (None for uns...
doc_27335
Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input v...
doc_27336
Returns the variance of all elements in the input tensor. If unbiased is False, then the variance will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used. Parameters input (Tensor) – the input tensor. unbiased (bool) – whether to use the unbiased estimation or not Example: >>> a...
doc_27337
Size in bytes.
doc_27338
tkinter.filedialog.askopenfilenames(**options) The above two functions create an Open dialog and return the selected filename(s) that correspond to existing file(s).
doc_27339
Array mapping from feature integer indices to feature name. Returns feature_nameslist A list of feature names.
doc_27340
tf.sparse.split( sp_input=None, num_split=None, axis=None, name=None ) If the sp_input.dense_shape[axis] is not an integer multiple of num_split each slice starting from 0:shape[axis] % num_split gets extra one dimension. For example: indices = [[0, 2], [0, 4], [0, 5], [1, 0], [1, 1]] values = [1, 2, 3, 4, 5] t =...
doc_27341
Return whether event should be ignored. This method should be called at the beginning of any event callback.
doc_27342
In-place version of lerp()
doc_27343
Return True if this Future is done. A Future is done if it has a result or an exception.
doc_27344
New in Django 3.2. Set this attribute to False to prevent Django from selecting a configuration class automatically. This is useful when apps.py defines only one AppConfig subclass but you don’t want Django to use it by default. Set this attribute to True to tell Django to select a configuration class automatically. ...
doc_27345
See Migration guide for more details. tf.compat.v1.nondifferentiable_batch_function tf.nondifferentiable_batch_function( num_batch_threads, max_batch_size, batch_timeout_micros, allowed_batch_sizes=None, max_enqueued_batches=10, autograph=True, enable_large_batch_splitting=True ) So, for example, in the ...
doc_27346
Execute the coroutine coro and return the result. This function runs the passed coroutine, taking care of managing the asyncio event loop, finalizing asynchronous generators, and closing the threadpool. This function cannot be called when another asyncio event loop is running in the same thread. If debug is True, the e...
doc_27347
Returns the unique elements of the input tensor. See torch.unique()
doc_27348
int goal_reached(int index, float cumcost) This method is called each iteration after popping an index from the heap, before examining the neighbours. This method can be overloaded to modify the behavior of the MCP algorithm. An example might be to stop the algorithm when a certain cumulative cost is reached, or when t...
doc_27349
See Migration guide for more details. tf.compat.v1.tpu.experimental.TPUSystemMetadata tf.tpu.experimental.TPUSystemMetadata( num_cores, num_hosts, num_of_cores_per_host, topology, devices ) Attributes num_cores interger. Total number of TPU cores in the TPU system. num_hosts interger. Total number...
doc_27350
Shift the surface image in place scroll(dx=0, dy=0) -> None Move the image by dx pixels right and dy pixels down. dx and dy may be negative for left and up scrolls respectively. Areas of the surface that are not overwritten retain their original pixel values. Scrolling is contained by the Surface clip area. It is saf...
doc_27351
remove Sprites from the Group remove(*sprites) -> None Remove any number of Sprites from the Group. This will only remove Sprites that are already members of the Group. Each sprite argument can also be a iterator containing Sprites.
doc_27352
Fit the model from data in X. Parameters Xarray-like of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. yIgnored Returns selfobject Returns the instance itself.
doc_27353
Add a centered supylabel to the figure. Parameters tstr The supylabel text. xfloat, default: 0.02 The x location of the text in figure coordinates. yfloat, default: 0.5 The y location of the text in figure coordinates. horizontalalignment, ha{'center', 'left', 'right'}, default: left The horizontal ...
doc_27354
Return alpha to be applied to all ContourSet artists.
doc_27355
Set the label2 text. Parameters sstr
doc_27356
Return a Path representing a circle of a given radius and center. Parameters center(float, float), default: (0, 0) The center of the circle. radiusfloat, default: 1 The radius of the circle. readonlybool Whether the created path should have the "readonly" argument set when creating the Path instance. ...
doc_27357
See Migration guide for more details. tf.compat.v1.raw_ops.TridiagonalMatMul tf.raw_ops.TridiagonalMatMul( superdiag, maindiag, subdiag, rhs, name=None ) Calculates product of two matrices, where left matrix is a tridiagonal matrix. Args superdiag A Tensor. Must be one of the following types: float64, f...
doc_27358
Computes the singular value decomposition of either a matrix or batch of matrices input. The singular value decomposition is represented as a namedtuple (U,S,V), such that input = U diag(S) Vᴴ, where Vᴴ is the transpose of V for the real-valued inputs, or the conjugate transpose of V for the complex-valued inputs. If i...
doc_27359
See Migration guide for more details. tf.compat.v1.data.experimental.DistributeOptions tf.data.experimental.DistributeOptions() You can set the distribution options of a dataset through the experimental_distribute property of tf.data.Options; the property is an instance of tf.data.experimental.DistributeOptions. opt...
doc_27360
Raised when an attempt is made to use an object that is not defined or is no longer usable.
doc_27361
Drawing function for box and whisker plots. Make a box and whisker plot for each column of x or each vector in sequence x. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end...
doc_27362
Draw samples from a standard Cauchy distribution with mode = 0. Also known as the Lorentz distribution. Note New code should use the standard_cauchy method of a default_rng() instance instead; please see the Quick Start. Parameters sizeint or tuple of ints, optional Output shape. If the given shape is, e.g., ...
doc_27363
Returns list List of segments in the LineCollection. Each list item contains an array of vertices.
doc_27364
Transform X. This is implemented by linking the points X into the graph of geodesic distances of the training data. First the n_neighbors nearest neighbors of X are found in the training data, and from these the shortest geodesic distances from each point in X to each point in the training data are computed in order ...
doc_27365
This method adapts obj to a ctypes type. It is called with the actual object used in a foreign function call when the type is present in the foreign function’s argtypes tuple; it must return an object that can be used as a function call parameter. All ctypes data types have a default implementation of this classmethod ...
doc_27366
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_27367
Represents an RSS enclosure
doc_27368
tf.compat.v1.gfile.Stat( filename ) Args filename string, path to a file Returns FileStatistics struct that contains information about the path Raises errors.OpError If the operation fails.
doc_27369
Returns a GEOSGeometry combining the points in this geometry not in other, and the points in other not in this geometry.
doc_27370
uu.encode(in_file, out_file, name=None, mode=None, *, backtick=False) Uuencode file in_file into file out_file. The uuencoded file will have the header specifying name and mode as the defaults for the results of decoding the file. The default defaults are taken from in_file, or '-' and 0o666 respectively. If backtick...
doc_27371
See Migration guide for more details. tf.compat.v1.raw_ops.Floor tf.raw_ops.Floor( x, name=None ) Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
doc_27372
Alias for field number 1
doc_27373
class frozenset([iterable]) Return a new set or frozenset object whose elements are taken from iterable. The elements of a set must be hashable. To represent sets of sets, the inner sets must be frozenset objects. If iterable is not specified, a new empty set is returned. Sets can be created by several means: Use a ...
doc_27374
See Migration guide for more details. tf.compat.v1.keras.applications.densenet.decode_predictions tf.keras.applications.densenet.decode_predictions( preds, top=5 ) Arguments preds Numpy array encoding a batch of predictions. top Integer, how many top-guesses to return. Defaults to 5. Retur...
doc_27375
Build a text report showing the main classification metrics. Read more in the User Guide. Parameters y_true1d array-like, or label indicator array / sparse matrix Ground truth (correct) target values. y_pred1d array-like, or label indicator array / sparse matrix Estimated targets as returned by a classifier...
doc_27376
Based on IntegerField and translates its input into NumericRange. Default for IntegerRangeField and BigIntegerRangeField.
doc_27377
Raw scoring function of the samples. Parameters Xarray-like of shape (n_samples, n_features) The data matrix. Returns score_samplesndarray of shape (n_samples,) Returns the (unshifted) scoring function of the samples.
doc_27378
Instance of the TestLoader class intended to be shared. If no customization of the TestLoader is needed, this instance can be used instead of repeatedly creating new instances.
doc_27379
New in Django 4.0. Override empty_result_set_value to None since most aggregate functions result in NULL when applied to an empty result set.
doc_27380
operator.invert(obj) operator.__inv__(obj) operator.__invert__(obj) Return the bitwise inverse of the number obj. This is equivalent to ~obj.
doc_27381
Gets or sets the CMY representation of the Color. cmy -> tuple The CMY representation of the Color. The CMY components are in the ranges C = [0, 1], M = [0, 1], Y = [0, 1]. Note that this will not return the absolutely exact CMY values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the CMY...
doc_27382
Takes a single “compressed” value of a field, for example a DateRangeField, and returns a tuple representing a lower and upper bound.
doc_27383
Check if coefficients match. New in version 1.6.0. Parameters otherclass instance The other class must have the coef attribute. Returns boolboolean True if the coefficients are the same, False otherwise.
doc_27384
Possible value for SSLContext.verify_mode, or the cert_reqs parameter to wrap_socket(). Except for PROTOCOL_TLS_CLIENT, it is the default mode. With client-side sockets, just about any cert is accepted. Validation errors, such as untrusted or expired cert, are ignored and do not abort the TLS/SSL handshake. In server m...
doc_27385
Alias for set_edgecolor.
doc_27386
>>> cache.get('my_key') 'hello, world!'
doc_27387
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_27388
A generic version of collections.abc.AsyncIterable. New in version 3.5.2. Deprecated since version 3.9: collections.abc.AsyncIterable now supports []. See PEP 585 and Generic Alias Type.
doc_27389
tf.profiler.experimental.Profile( logdir, options=None ) Profiling will start when entering the scope, and stop and save the results to the logdir when exits the scope. Open TensorBoard profile tab to view results. Example usage: with tf.profiler.experimental.Profile("/path/to/logdir"): # do some work Args...
doc_27390
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_27391
tf.compat.v1.keras.backend.set_session( session ) Arguments session A TF Session.
doc_27392
Return real and imaginary responses to Gabor filter. The real and imaginary parts of the Gabor filter kernel are applied to the image and the response is returned as a pair of arrays. Gabor filter is a linear filter with a Gaussian kernel which is modulated by a sinusoidal plane wave. Frequency and orientation repres...
doc_27393
Perform total-variation denoising on n-dimensional images. Parameters imagendarray of ints, uints or floats Input data to be denoised. image can be of any numeric type, but it is cast into an ndarray of floats for the computation of the denoised image. weightfloat, optional Denoising weight. The greater wei...
doc_27394
Converts a float tensor to a per-channel quantized tensor with given scales and zero points. Parameters input (Tensor) – float tensor to quantize scales (Tensor) – float 1D tensor of scales to use, size should match input.size(axis) zero_points (int) – integer 1D tensor of offset to use, size should match input....
doc_27395
Add the coordinates of an event to the list of clicks. Parameters eventMouseEvent
doc_27396
Base class for other signals and a subclass of ArithmeticError.
doc_27397
Encode the bytes-like object b using base85 (as used in e.g. git-style binary diffs) and return the encoded bytes. If pad is true, the input is padded with b'\0' so its length is a multiple of 4 bytes before encoding. New in version 3.4.
doc_27398
Set or remove the completion display function. If function is specified, it will be used as the new completion display function; if omitted or None, any completion display function already installed is removed. This sets or clears the rl_completion_display_matches_hook callback in the underlying library. The completion...
doc_27399
Assert that the mock was awaited at least once. Note that this is separate from the object having been called, the await keyword must be used: >>> mock = AsyncMock() >>> async def main(coroutine_mock): ... await coroutine_mock ... >>> coroutine_mock = mock() >>> mock.called True >>> mock.assert_awaited() Traceback ...