_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_23300
Bases: Exception Raised when trying show a figure in a non-GUI backend.
doc_23301
A callable that takes two arguments, name and value, where name is a header field name and value is an unfolded header field value, and returns a string subclass that represents that header. A default header_factory (see headerregistry) is provided that supports custom parsing for the various address and date RFC 5322 ...
doc_23302
self.short() is equivalent to self.to(torch.int16). See to(). Parameters memory_format (torch.memory_format, optional) – the desired memory format of returned Tensor. Default: torch.preserve_format.
doc_23303
Returns the input values as a JSON array, or default if there are no values. You can query the result using key and index lookups. distinct New in Django 3.2. An optional boolean argument that determines if array values will be distinct. Defaults to False. ordering New in Django 3.2. An optional string of...
doc_23304
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_23305
Convert strings in the Series/Index to lowercase. Equivalent to str.lower(). Returns Series or Index of object See also Series.str.lower Converts all characters to lowercase. Series.str.upper Converts all characters to uppercase. Series.str.title Converts first character of each word to uppercase and rem...
doc_23306
Query the columns of a DataFrame with a boolean expression. Parameters expr:str The query string to evaluate. You can refer to variables in the environment by prefixing them with an ‘@’ character like @a + b. You can refer to column names that are not valid Python variable names by surrounding them in backticks...
doc_23307
Bases: skimage.viewer.plugins.plotplugin.PlotPlugin Plugin to compute interpolated intensity under a scan line on an image. See PlotPlugin and Plugin classes for additional details. Parameters maxdistfloat Maximum pixel distance allowed when selecting end point of scan line. limitstuple or {None, ‘image’, ‘dt...
doc_23308
Call the underlying MessageBeep() function from the Platform API. This plays a sound as specified in the registry. The type argument specifies which sound to play; possible values are -1, MB_ICONASTERISK, MB_ICONEXCLAMATION, MB_ICONHAND, MB_ICONQUESTION, and MB_OK, all described below. The value -1 produces a “simple b...
doc_23309
See Migration guide for more details. tf.compat.v1.keras.models.clone_model tf.keras.models.clone_model( model, input_tensors=None, clone_function=None ) Model cloning is similar to calling a model on new inputs, except that it creates new layers (and thus new weights) instead of sharing the weights of the exist...
doc_23310
bz2.open(filename, mode='rb', compresslevel=9, encoding=None, errors=None, newline=None) Open a bzip2-compressed file in binary or text mode, returning a file object. As with the constructor for BZ2File, the filename argument can be an actual filename (a str or bytes object), or an existing file object to read from o...
doc_23311
Kernel Principal component analysis (KPCA). Non-linear dimensionality reduction through the use of kernels (see Pairwise metrics, Affinities and Kernels). Read more in the User Guide. Parameters n_componentsint, default=None Number of components. If None, all non-zero components are kept. kernel{‘linear’, ‘po...
doc_23312
See Migration guide for more details. tf.compat.v1.fake_quant_with_min_max_vars_per_channel, tf.compat.v1.quantization.fake_quant_with_min_max_vars_per_channel tf.quantization.fake_quant_with_min_max_vars_per_channel( inputs, min, max, num_bits=8, narrow_range=False, name=None ) Fake-quantize the inputs tensor o...
doc_23313
class sklearn.decomposition.FastICA(n_components=None, *, algorithm='parallel', whiten=True, fun='logcosh', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None) [source] FastICA: a fast algorithm for Independent Component Analysis. Read more in the User Guide. Parameters n_componentsint, defau...
doc_23314
See Migration guide for more details. tf.compat.v1.config.optimizer.set_experimental_options tf.config.optimizer.set_experimental_options( options ) Note that optimizations are only applied in graph mode, (within tf.function). In addition, as these are experimental options, the list is subject to change. Ar...
doc_23315
Generate cross-validated estimates for each input data point The data is split according to the cv parameter. Each sample belongs to exactly one test set, and its prediction is computed with an estimator fitted on the corresponding training set. Passing these predictions into an evaluation metric may not be a valid w...
doc_23316
Return the interpreter specified in the #! line at the start of the archive. If there is no #! line, return None. The archive argument can be a filename or a file-like object open for reading in bytes mode. It is assumed to be at the start of the archive.
doc_23317
This method for the Stats class removes all leading path information from file names. It is very useful in reducing the size of the printout to fit within (close to) 80 columns. This method modifies the object, and the stripped information is lost. After performing a strip operation, the object is considered to have it...
doc_23318
Computes the multiplicative inverse matrix of a square matrix input, or of each square matrix in a batched input. The result satisfies the relation: matmul(inv(input),input) = matmul(input,inv(input)) = eye(input.shape[0]).expand_as(input). Supports input of float, double, cfloat and cdouble data types. Note When give...
doc_23319
Return the number of bytes in the underlying data.
doc_23320
Update colors from the scalar mappable array, if any. Assign colors to edges and faces based on the array and/or colors that were directly set, as appropriate.
doc_23321
Whether the categories have an ordered relationship.
doc_23322
torch.random.fork_rng(devices=None, enabled=True, _caller='fork_rng', _devices_kw='devices') [source] Forks the RNG, so that when you return, the RNG is reset to the state that it was previously in. Parameters devices (iterable of CUDA IDs) – CUDA devices for which to fork the RNG. CPU RNG state is always forked....
doc_23323
A list of functions performing the individual tests. Each function takes two arguments: the byte-stream and an open file-like object. When what() is called with a byte-stream, the file-like object will be None. The test function should return a string describing the image type if the test succeeded, or None if it faile...
doc_23324
Block until the value of this Future is ready. Returns The value held by this Future. If the function (callback or RPC) creating the value has thrown an error, this wait method will also throw an error.
doc_23325
Return the current hatching pattern.
doc_23326
tf.profiler.experimental.stop( save=True ) The profiler session will be stopped and profile results can be saved. Args save An optional variable to save the results to TensorBoard. Default True. Raises UnavailableError If there is no active profiling session.
doc_23327
A 1-D view of the scalar.
doc_23328
Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters filestr or Path A string naming the dump file. Changed in version 1.17.0: pathlib.Path objects are now accepted.
doc_23329
For a nonzero number, return the adjusted exponent of its operand as a Decimal instance. If the operand is a zero then Decimal('-Infinity') is returned and the DivisionByZero flag is raised. If the operand is an infinity then Decimal('Infinity') is returned.
doc_23330
Return whether the artist is pickable. See also set_picker, get_picker, pick
doc_23331
Add embedding projector data to summary. Parameters mat (torch.Tensor or numpy.array) – A matrix which each row is the feature vector of the data point metadata (list) – A list of labels, each element will be convert to string label_img (torch.Tensor) – Images correspond to each data point global_step (int) – ...
doc_23332
Show the docstring of entrypoint model. Parameters github (string) – a string with format <repo_owner/repo_name[:tag_name]> with an optional tag/branch. The default branch is master if not specified. Example: ‘pytorch/vision[:hub]’ model (string) – a string of entrypoint name defined in repo’s hubconf.py force_...
doc_23333
Convert to a string, using engineering notation if an exponent is needed. Engineering notation has an exponent which is a multiple of 3. This can leave up to 3 digits to the left of the decimal place and may require the addition of either one or two trailing zeros.
doc_23334
tf.compat.v1.layers.Flatten( data_format=None, **kwargs ) Arguments data_format A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch, ..., channels) while channels_first corresponds to inputs with sh...
doc_23335
Returns the netloc unchanged as bytes. Return type bytes
doc_23336
Returns the value for the given header, or an alternate if the header doesn’t exist.
doc_23337
Set the image extent. Parameters extent4-tuple of float The position and size of the image as tuple (left, right, bottom, top) in data coordinates. Notes This updates ax.dataLim, and, if autoscaling, sets ax.viewLim to tightly fit the image, regardless of dataLim. Autoscaling state is not changed, so follow...
doc_23338
Return the font stretch or width. Options are: 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'.
doc_23339
Returns a new instance of the StreamHandler class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used. emit(record) If a formatter is specified, it is used to format the record. The record is then written to the stream followed by terminator. If exception informa...
doc_23340
This function is used by check() to process tokens generated by the tokenize module.
doc_23341
tf.experimental.numpy.logaddexp2( x1, x2 ) Unsupported arguments: out, where, casting, order, dtype, subok, signature, extobj. See the NumPy documentation for numpy.logaddexp2.
doc_23342
Whether this object allows duplicate labels. Setting allows_duplicate_labels=False ensures that the index (and columns of a DataFrame) are unique. Most methods that accept and return a Series or DataFrame will propagate the value of allows_duplicate_labels. See Duplicate Labels for more. See also DataFrame.attrs S...
doc_23343
Set the artist offset transform. Parameters transOffsetTransform
doc_23344
The string used to terminate lines produced by the writer. It defaults to '\r\n'. Note The reader is hard-coded to recognise either '\r' or '\n' as end-of-line, and ignores lineterminator. This behavior may change in the future.
doc_23345
Bases: matplotlib.transforms.BboxBase A mutable bounding box. Examples Create from known bounds The default constructor takes the boundary "points" [[xmin, ymin], [xmax, ymax]]. >>> Bbox([[1, 1], [3, 7]]) Bbox([[1.0, 1.0], [3.0, 7.0]]) Alternatively, a Bbox can be created from the flattened points array, the so-call...
doc_23346
Draw the Artist (and its children) using the given renderer. This has no effect if the artist is not visible (Artist.get_visible returns False). Parameters rendererRendererBase subclass. Notes This method is overridden in the Artist subclasses.
doc_23347
For a MemoryHandler, flushing means just sending the buffered records to the target, if there is one. The buffer is also cleared when this happens. Override if you want different behavior.
doc_23348
Select features according to the k highest scores. Read more in the User Guide. Parameters score_funccallable, default=f_classif Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues) or a single array with scores. Default is f_classif (see below “See Also”). The default function o...
doc_23349
Returns an unused port that should be suitable for binding. This is achieved by creating a temporary socket with the same family and type as the sock parameter (default is AF_INET, SOCK_STREAM), and binding it to the specified host address (defaults to 0.0.0.0) with the port set to 0, eliciting an unused ephemeral port...
doc_23350
Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. An OSError is raised if the source code cannot be retrieved. Changed in version 3.3: OSError is raised instead of IOError, now an al...
doc_23351
writes a timestamped system-exclusive midi message. write_sys_ex(when, msg) -> None Writes a timestamped system-exclusive midi message. Parameters: msg (list[int] or str) -- midi message when -- timestamp in milliseconds Example: midi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7') # is equivale...
doc_23352
See Migration guide for more details. tf.compat.v1.raw_ops.StringToHashBucket tf.raw_ops.StringToHashBucket( string_tensor, num_buckets, name=None ) The hash function is deterministic on the content of the string within the process. Note that the hash function may change from time to time. This functionality wil...
doc_23353
Set the path effects. Parameters path_effectsAbstractPathEffect
doc_23354
This method is called from dispatch_call() when there is the possibility that a break might be necessary anywhere inside the called function.
doc_23355
tf.experimental.numpy.append( arr, values, axis=None ) See the NumPy documentation for numpy.append.
doc_23356
Return the value of the environment variable key if it exists, or default if it doesn’t. key, default and the result are bytes. getenvb() is only available if supports_bytes_environ is True. Availability: most flavors of Unix. New in version 3.2.
doc_23357
Return the aspect ratio of the bbox mutation.
doc_23358
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalMaxIntraOpParallelismDataset tf.raw_ops.ExperimentalMaxIntraOpParallelismDataset( input_dataset, max_intra_op_parallelism, output_types, output_shapes, name=None ) Args input_dataset A Tensor of type variant. max_intra_op_paralle...
doc_23359
Option for create_default_context() and SSLContext.load_default_certs(). This value indicates that the context may be used to authenticate Web clients (therefore, it will be used to create server-side sockets). New in version 3.4.
doc_23360
Between MINYEAR and MAXYEAR inclusive.
doc_23361
CFFI interface Returns interfacenamedtuple Named tuple containing CFFI wrapper state_address - Memory address of the state struct state - pointer to the state struct next_uint64 - function pointer to produce 64 bit integers next_uint32 - function pointer to produce 32 bit integers next_double - function pointe...
doc_23362
Combination of all locale settings. If this flag is used when the locale is changed, setting the locale for all categories is attempted. If that fails for any category, no category is changed at all. When the locale is retrieved using this flag, a string indicating the setting for all categories is returned. This strin...
doc_23363
Call function producing a like-indexed Series on each group and return a Series having the same indexes as the original object filled with the transformed values. Parameters f:function Function to apply to each group. Can also accept a Numba JIT function with engine='numba' specified. If the 'numba' engine is c...
doc_23364
class sklearn.ensemble.RandomForestClassifier(n_estimators=100, *, criterion='gini', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=True, oob_score=False, n_jobs=None, random_s...
doc_23365
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred) ** 2).sum() and \(v\) is the total sum of squares ((y_true - y_true.mean()) ** 2).sum(). The best possible score is 1.0 and it c...
doc_23366
Multiply self by other, and return a new masked array.
doc_23367
Set a task factory that will be used by loop.create_task(). If factory is None the default task factory will be set. Otherwise, factory must be a callable with the signature matching (loop, coro), where loop is a reference to the active event loop, and coro is a coroutine object. The callable must return a asyncio.Futu...
doc_23368
Registers a Constraint subclass in this registry. Usage: @my_registry.register(MyConstraintClass) def construct_transform(constraint): assert isinstance(constraint, MyConstraint) return MyTransform(constraint.arg_constraints) Parameters constraint (subclass of Constraint) – A subclass of Constraint, or a...
doc_23369
See Migration guide for more details. tf.compat.v1.debugging.get_log_device_placement tf.debugging.get_log_device_placement() Returns If device placements are logged.
doc_23370
True if this transform has a corresponding inverse transform.
doc_23371
Instructs writer objects to quote all non-numeric fields. Instructs the reader to convert all non-quoted fields to type float.
doc_23372
items(section, raw=False, vars=None) When section is not given, return a list of section_name, section_proxy pairs, including DEFAULTSECT. Otherwise, return a list of name, value pairs for the options in the given section. Optional arguments have the same meaning as for the get() method. Changed in version 3.8: Item...
doc_23373
The negative log likelihood loss. See NLLLoss for details. Parameters input – (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-dimensional loss. target – (N)(N) where each value is 0≤target...
doc_23374
Use an index array to construct a new array from a set of choices. Refer to numpy.choose for full documentation. See also numpy.choose equivalent function
doc_23375
class logging.StreamHandler(stream=None) Returns a new instance of the StreamHandler class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used. emit(record) If a formatter is specified, it is used to format the record. The record is then written to the stream f...
doc_23376
Attempt to infer better dtypes for object columns. Attempts soft conversion of object-dtyped columns, leaving non-object and unconvertible columns unchanged. The inference rules are the same as during normal Series/DataFrame construction. Returns converted:same type as input object See also to_datetime Con...
doc_23377
Returns a queryset, filtered using the query arguments defined by lookup. Enforces any restrictions on the queryset, such as allow_empty and allow_future.
doc_23378
Return threshold value based on Yen’s method. Either image or hist must be provided. In case hist is given, the actual histogram of the image is ignored. Parameters image(N, M) ndarray, optional Input image. nbinsint, optional Number of bins used to calculate histogram. This value is ignored for integer arr...
doc_23379
Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)).
doc_23380
class sklearn.multioutput.RegressorChain(base_estimator, *, order=None, cv=None, random_state=None) [source] A multi-label model that arranges regressions into a chain. Each model makes a prediction in the order specified by the chain using all of the available features provided to the model plus the predictions of m...
doc_23381
Return True if the object can be used in await expression. Can also be used to distinguish generator-based coroutines from regular generators: def gen(): yield @types.coroutine def gen_coro(): yield assert not isawaitable(gen()) assert isawaitable(gen_coro()) New in version 3.5.
doc_23382
See Migration guide for more details. tf.compat.v1.raw_ops.StackPushV2 tf.raw_ops.StackPushV2( handle, elem, swap_memory=False, name=None ) Args handle A Tensor of type resource. The handle to a stack. elem A Tensor. The tensor to be pushed onto the stack. swap_memory An optional bool. Defau...
doc_23383
Tuple of strings listing the field names. Useful for introspection and for creating new named tuple types from existing named tuples. >>> p._fields # view the field names ('x', 'y') >>> Color = namedtuple('Color', 'red green blue') >>> Pixel = namedtuple('Pixel', Point._fields + Color._fields) >>> Pixel(11,...
doc_23384
Fit the estimators. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vectors, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target values. sample_weightarray-like of shape (n_samples,), default=None S...
doc_23385
This attribute is optional when the form field does not have a choices attribute. If it does, it will override anything you set here when the attribute is updated on the Field.
doc_23386
Set the sketch parameters. Parameters scalefloat, optional The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is None, or not provided, no sketch filter will be provided. lengthfloat, optional The length of the wiggle along the line, in pixels (default 128.0) randomnessfloat...
doc_23387
Fill NA/NaN values using the specified method. Parameters value:scalar, dict, Series, or DataFrame Value to use to fill holes (e.g. 0), alternately a dict/Series/DataFrame of values specifying which value to use for each index (for a Series) or column (for a DataFrame). Values not in the dict/Series/DataFrame w...
doc_23388
Reorders n-dimensional FFT data, as provided by fftn(), to have negative frequency terms first. This performs a periodic shift of n-dimensional data such that the origin (0, ..., 0) is moved to the center of the tensor. Specifically, to input.shape[dim] // 2 in each selected dimension. Note By convention, the FFT retu...
doc_23389
Represents a reader object that provides APIs to read data from the IO stream. It is not recommended to instantiate StreamReader objects directly; use open_connection() and start_server() instead. coroutine read(n=-1) Read up to n bytes. If n is not provided, or set to -1, read until EOF and return all read bytes. ...
doc_23390
Set the virtual screen cursor to y, x. If y and x are both -1, then leaveok is set True.
doc_23391
Like rfind, but raises ValueError when the substring sub is not found. Calls str.rindex element-wise. Parameters aarray-like of str or unicode substr or unicode start, endint, optional Returns outndarray Output array of ints. See also rfind, str.rindex
doc_23392
Tag classes to bind when creating the serializer. Other tags can be added later using register().
doc_23393
The prefix that should be used for all URLs defined on the blueprint.
doc_23394
Return the value of the boundary parameter of the Content-Type header of the message, or failobj if either the header is missing, or has no boundary parameter. The returned string will always be unquoted as per email.utils.unquote().
doc_23395
Logs a message with level ERROR on this logger. The arguments are interpreted as for debug().
doc_23396
Return the time of last access of path. The return value is a floating point number giving the number of seconds since the epoch (see the time module). Raise OSError if the file does not exist or is inaccessible.
doc_23397
Both parameters are raw strings of the names. asname can be None if the regular name is to be used. >>> print(ast.dump(ast.parse('from ..foo.bar import a as b, c'), indent=4)) Module( body=[ ImportFrom( module='foo.bar', names=[ alias(name='a', asname='b'), ...
doc_23398
Return the scaled companion matrix of c. The basis polynomials are scaled so that the companion matrix is symmetric when c is a Chebyshev basis polynomial. This provides better eigenvalue estimates than the unscaled case and for basis polynomials the eigenvalues are guaranteed to be real if numpy.linalg.eigvalsh is u...
doc_23399
Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters filestr or Path A string naming the dump file. Changed in version 1.17.0: pathlib.Path objects are now accepted.