_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_4100
Set multiple properties at once. Supported properties are Property Description 3d_properties unknown agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha scalar or None animated bool antialiased or aa bool clip_box Bbox clip_on bool ...
doc_4101
Return a is not b. Tests object identity.
doc_4102
Base class for window bounds calculations. Methods get_window_bounds([num_values, min_periods, ...]) Computes the bounds of a window.
doc_4103
module of example programs These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. There are several ways to run the examples. First they can be run as stand-alone programs. ...
doc_4104
Decode parameters list according to RFC 2231. params is a sequence of 2-tuples containing elements of the form (content-type, string-value).
doc_4105
Return True if all characters in the string are digits and there is at least one character, False otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. This covers digits which cannot be used to form numbers in base 10, like the Kharosthi numbe...
doc_4106
Return a new transform with an added offset. Parameters transTransform subclass Any transform, to which offset will be applied. figFigure, default: None Current figure. It can be None if units are 'dots'. x, yfloat, default: 0.0 The offset to apply. units{'inches', 'points', 'dots'}, default: 'inches'...
doc_4107
URL specifying how to initialize the process group. Default is env://
doc_4108
Between 1 and the number of days in the given month of the given year.
doc_4109
class sklearn.base.RegressorMixin [source] Mixin class for all regression estimators in scikit-learn. Methods score(X, y[, sample_weight]) Return the coefficient of determination \(R^2\) of the prediction. score(X, y, sample_weight=None) [source] Return the coefficient of determination \(R^2\) of the predicti...
doc_4110
See Migration guide for more details. tf.compat.v1.keras.backend.image_data_format tf.keras.backend.image_data_format() Returns A string, either 'channels_first' or 'channels_last' Example: tf.keras.backend.image_data_format() 'channels_last'
doc_4111
It’s possible to loop over every key in the database using this method and the nextkey() method. The traversal is ordered by gdbm’s internal hash values, and won’t be sorted by the key values. This method returns the starting key.
doc_4112
Save an array as an image file. Parameters fnamestr or path-like or file-like A path or a file-like object to store the image in. If format is not set, then the output format is inferred from the extension of fname, if any, and from rcParams["savefig.format"] (default: 'png') otherwise. If format is set, it det...
doc_4113
Holds the data and list of batch_sizes of a packed sequence. All RNN modules accept packed sequences as inputs. Note Instances of this class should never be created manually. They are meant to be instantiated by functions like pack_padded_sequence(). Batch sizes represent the number elements at each sequence step in...
doc_4114
Represents a del statement. targets is a list of nodes, such as Name, Attribute or Subscript nodes. >>> print(ast.dump(ast.parse('del x,y,z'), indent=4)) Module( body=[ Delete( targets=[ Name(id='x', ctx=Del()), Name(id='y', ctx=Del()), Name(id='z'...
doc_4115
Subset of data from the LFW dataset. This database is a subset of the LFW database containing: 100 faces 100 non-faces The full dataset is available at [2]. Returns images(200, 25, 25) uint8 ndarray 100 first images are faces and subsequent 100 are non-faces. Notes The faces were randomly selected from th...
doc_4116
Decorator for tests which involve reference counting. The decorator does not run the test if it is not run by CPython. Any trace function is unset for the duration of the test to prevent unexpected refcounts caused by the trace function.
doc_4117
Roll provided date forward to next offset only if not on offset. Returns TimeStamp Rolled timestamp if not on offset, otherwise unchanged timestamp.
doc_4118
Telnet represents a connection to a Telnet server. The instance is initially not connected by default; the open() method must be used to establish a connection. Alternatively, the host name and optional port number can be passed to the constructor too, in which case the connection to the server will be established befo...
doc_4119
See Migration guide for more details. tf.compat.v1.zeros tf.zeros( shape, dtype=tf.dtypes.float32, name=None ) See also tf.zeros_like, tf.ones, tf.fill, tf.eye. This operation returns a tensor of type dtype with shape shape and all elements set to zero. tf.zeros([3, 4], tf.int32) <tf.Tensor: shape=(3, 4), dtype...
doc_4120
Return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
doc_4121
Parameters poly – a polygon, i.e. a tuple of pairs of numbers fill – a color the poly will be filled with outline – a color for the poly’s outline (if given) Example: >>> poly = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s = Shape("compound") >>> s.addcomponent(poly, "red", "blue") >>> # ... add more components and t...
doc_4122
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedTensorToVariantGradient tf.raw_ops.RaggedTensorToVariantGradient( encoded_ragged_grad, row_splits, dense_values_shape, Tvalues, name=None ) Computes the gradient for the dense_values input to the RaggedTensorToVariant op, given the variant-encoded ...
doc_4123
Return the semi-major and semi-minor radii of the annulus.
doc_4124
Returns a clone of self with given hyperparameters theta. Parameters thetandarray of shape (n_dims,) The hyperparameters
doc_4125
Evaluate a 2-D Laguerre series on the Cartesian product of x and y. This function returns the values: \[p(a,b) = \sum_{i,j} c_{i,j} * L_i(a) * L_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_4126
Reverse the transformation operation Parameters Xarray of shape [n_samples, n_selected_features] The input samples. Returns X_rarray of shape [n_samples, n_original_features] X with columns of zeros inserted where features would have been removed by transform.
doc_4127
Return the locations (indices) of labels in the index. As in the asof function, if the label (a particular entry in where) is not in the index, the latest index label up to the passed label is chosen and its index returned. If all of the labels in the index are later than a label in where, -1 is returned. mask is use...
doc_4128
Call self as a function.
doc_4129
See Migration guide for more details. tf.compat.v1.raw_ops.CollectiveReduce tf.raw_ops.CollectiveReduce( input, group_size, group_key, instance_key, merge_op, final_op, subdiv_offsets, wait_for=[], communication_hint='auto', timeout_seconds=0, name=None ) Args input A Tensor. Must be one of the foll...
doc_4130
See Migration guide for more details. tf.compat.v1.raw_ops.Rint tf.raw_ops.Rint( x, name=None ) If the result is midway between two representable values, the even representable is chosen. For example: rint(-1.5) ==> -2.0 rint(0.5000001) ==> 1.0 rint([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]) ==> [-2., -2., -0., 0.,...
doc_4131
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_4132
Set the minimum and maximum theta values. Can take the following signatures: set_thetalim(minval, maxval): Set the limits in radians. set_thetalim(thetamin=minval, thetamax=maxval): Set the limits in degrees. where minval and maxval are the minimum and maximum limits. Values are wrapped in to the range \([0, 2\pi...
doc_4133
+self
doc_4134
Bases: mpl_toolkits.axes_grid1.axes_size._Base get_size(renderer)[source]
doc_4135
Returns the number of non-fixed hyperparameters of the kernel.
doc_4136
Return a direction vector. Parameters zdir{'x', 'y', 'z', None, 3-tuple} The direction. Possible values are: 'x': equivalent to (1, 0, 0) 'y': equivalent to (0, 1, 0) 'z': equivalent to (0, 0, 1) None: equivalent to (0, 0, 0) an iterable (x, y, z) is converted to a NumPy array, if not already Returns x...
doc_4137
Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane. Parameters Xarray-like or sparse matrix, shape (n_samples, n_features) Samples. Returns array, shape=(n_samples,) if n_classes == 2 else (n_samples, n_classes) ...
doc_4138
Convert an image to double-precision (64-bit) floating point format. Parameters imagendarray Input image. force_copybool, optional Force a copy of the data, irrespective of its current dtype. Returns outndarray of float64 Output image. Notes The range of a floating point image is [0.0, 1.0] or [...
doc_4139
Instantiate an instance of FigureCanvasClass This is used for backend switching, e.g., to instantiate a FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is not done, so any changes to one of the instances (e.g., setting figure size or line props), will be reflected in the other
doc_4140
template A class attribute, as a format string, that describes the SQL that is generated for this aggregate. Defaults to '%(function)s(%(distinct)s%(expressions)s)'. function A class attribute describing the aggregate function that will be generated. Specifically, the function will be interpolated as the func...
doc_4141
Set the linewidth(s) for the collection. lw can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence Parameters lwfloat or list of floats
doc_4142
See Migration guide for more details. tf.compat.v1.raw_ops.ParallelInterleaveDatasetV3 tf.raw_ops.ParallelInterleaveDatasetV3( input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, f, output_types, output_shapes, deterministic='default', name=None ) The resulting dataset is similar ...
doc_4143
Total number of frames that composed the traceback before truncation. This attribute can be set to None if the information is not available.
doc_4144
Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.
doc_4145
Returns the log-transformed bounds on the theta. Returns boundsndarray of shape (n_dims, 2) The log-transformed bounds on the kernel’s hyperparameters theta
doc_4146
Corners of rectangle from lower left, moving clockwise.
doc_4147
When an object referenced by a ForeignKey is deleted, Django will emulate the behavior of the SQL constraint specified by the on_delete argument. For example, if you have a nullable ForeignKey and you want it to be set null when the referenced object is deleted: user = models.ForeignKey( User, models.SET_NULL, ...
doc_4148
The response body to send as the WSGI iterable. A list of strings or bytes represents a fixed-length response, any other iterable is a streaming response. Strings are encoded to bytes as UTF-8. Do not set to a plain string or bytes, that will cause sending the response to be very inefficient as it will iterate one byte...
doc_4149
Find artist objects. Recursively find all Artist instances contained in the artist. Parameters match A filter criterion for the matches. This can be None: Return all objects contained in artist. A function with signature def match(artist: Artist) -> bool. The result will only contain artists for which the funct...
doc_4150
re.DOTALL Make the '.' special character match any character at all, including a newline; without this flag, '.' will match anything except a newline. Corresponds to the inline flag (?s).
doc_4151
atexit.register(func, *args, **kwargs) Register func as a function to be executed at termination. Any optional arguments that are to be passed to func must be passed as arguments to register(). It is possible to register the same function and arguments more than once. At normal program termination (for instance, if s...
doc_4152
Evaluate a 3-D Hermite series on the Cartesian product of x, y, and z. This function returns the values: \[p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * H_i(a) * H_j(b) * H_k(c)\] where the points (a, b, c) consist of all triples formed by taking a from x, b from y, and c from z. The resulting points form a grid with x in the...
doc_4153
Assert that the mock was awaited exactly once. >>> mock = AsyncMock() >>> async def main(): ... await mock() ... >>> asyncio.run(main()) >>> mock.assert_awaited_once() >>> asyncio.run(main()) >>> mock.method.assert_awaited_once() Traceback (most recent call last): ... AssertionError: Expected mock to have been awai...
doc_4154
Flag message number which for deletion. On most servers deletions are not actually performed until QUIT (the major exception is Eudora QPOP, which deliberately violates the RFCs by doing pending deletes on any disconnect).
doc_4155
torch.utils.dlpack.from_dlpack(dlpack) → Tensor Decodes a DLPack to a tensor. Parameters dlpack – a PyCapsule object with the dltensor The tensor will share the memory with the object represented in the dlpack. Note that each dlpack can only be consumed once. torch.utils.dlpack.to_dlpack(tensor) → PyCapsule ...
doc_4156
Deletes the key-value pair associated with key from the store. Returns true if the key was successfully deleted, and false if it was not. Warning The delete_key API is only supported by the TCPStore and HashStore. Using this API with the FileStore will result in an exception. Parameters key (str) – The key to be de...
doc_4157
Guess the extensions for a file based on its MIME type, given by type. The return value is a list of strings giving all possible filename extensions, including the leading dot ('.'). The extensions are not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type type by g...
doc_4158
Plot a decision tree. The sample counts that are shown are weighted with any sample_weights that might be present. The visualization is fit automatically to the size of the axis. Use the figsize or dpi arguments of plt.figure to control the size of the rendering. Read more in the User Guide. New in version 0.21. P...
doc_4159
Called when a connection is made. The transport argument is the transport representing the connection. The protocol is responsible for storing the reference to its transport.
doc_4160
'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_4161
Add fallback as the fallback object for the current translation object. A translation object should consult the fallback if it cannot provide a translation for a given message.
doc_4162
Return whether the path is absolute or not. A path is considered absolute if it has both a root and (if the flavour allows) a drive: >>> PurePosixPath('/a/b').is_absolute() True >>> PurePosixPath('a/b').is_absolute() False >>> PureWindowsPath('c:/a/b').is_absolute() True >>> PureWindowsPath('/a/b').is_absolute() False...
doc_4163
The last nonempty command prefix seen.
doc_4164
This class is used to handle the HTTP requests that arrive at the server. By itself, it cannot respond to any actual HTTP requests; it must be subclassed to handle each request method (e.g. GET or POST). BaseHTTPRequestHandler provides a number of class and instance variables, and methods for use by subclasses. The han...
doc_4165
Start a subprocess to start the manager. If initializer is not None then the subprocess will call initializer(*initargs) when it starts.
doc_4166
sklearn.utils._safe_indexing(X, indices, *, axis=0) [source] Return rows, items or columns of X using indices. Warning This utility is documented, but private. This means that backward compatibility might be broken without any deprecation cycle. Parameters Xarray-like, sparse-matrix, list, pandas.DataFrame, pan...
doc_4167
Generate a random regression problem. The input set can either be well conditioned (by default) or have a low rank-fat tail singular profile. See make_low_rank_matrix for more details. The output is generated by applying a (potentially biased) random linear regression model with n_informative nonzero regressors to th...
doc_4168
Wait for the Future instances (possibly created by different Executor instances) given by fs to complete. Returns a named 2-tuple of sets. The first set, named done, contains the futures that completed (finished or cancelled futures) before the wait completed. The second set, named not_done, contains the futures that d...
doc_4169
Top level container for Callgrind results collected by Timer. Manipulation is generally done using the FunctionCounts class, which is obtained by calling CallgrindStats.stats(…). Several convenience methods are provided as well; the most significant is CallgrindStats.as_standardized(). as_standardized() [source] ...
doc_4170
class sklearn.tree.ExtraTreeRegressor(*, criterion='mse', splitter='random', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', random_state=None, min_impurity_decrease=0.0, min_impurity_split=None, max_leaf_nodes=None, ccp_alpha=0.0) [source] An extremely rand...
doc_4171
Adds a new tab to the notebook. If window is currently managed by the notebook but hidden, it is restored to its previous position. See Tab Options for the list of available options.
doc_4172
The objects in the changelist page can be filtered with lookups from the URL’s query string. This is how list_filter works, for example. The lookups are similar to what’s used in QuerySet.filter() (e.g. user__email=user@example.com). Since the lookups in the query string can be manipulated by the user, they must be san...
doc_4173
Return DataFrame with counts of unique elements in each position. Parameters dropna:bool, default True Don’t include NaN in the counts. Returns nunique: DataFrame Examples >>> df = pd.DataFrame({'id': ['spam', 'egg', 'egg', 'spam', ... 'ham', 'ham'], ... 'va...
doc_4174
[Deprecated] The default Matplotlib button actions for extra mouse buttons. Notes Deprecated since version 3.4.
doc_4175
Returns the general category assigned to the character chr as string.
doc_4176
Process identification number (PID). Note that for processes created by the create_subprocess_shell() function, this attribute is the PID of the spawned shell.
doc_4177
col_offset end_lineno end_col_offset Instances of ast.expr and ast.stmt subclasses have lineno, col_offset, lineno, and col_offset attributes. The lineno and end_lineno are the first and last line numbers of source text span (1-indexed so the first line is line 1) and the col_offset and end_col_offset are the cor...
doc_4178
Alias for set_edgecolor.
doc_4179
Return the latest FreeType error get_error() -> str get_error() -> None Return a description of the last error which occurred in the FreeType2 library, or None if no errors have occurred.
doc_4180
Execute the command and gather statistics from the execution with the current tracing parameters. cmd must be a string or code object, suitable for passing into exec().
doc_4181
'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_4182
tf.keras.layers.MaxPooling1D Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.layers.MaxPool1D, tf.compat.v1.keras.layers.MaxPooling1D tf.keras.layers.MaxPool1D( pool_size=2, strides=None, padding='valid', data_format='channels_last', **kwargs ) Downsamples the input repr...
doc_4183
Return the number of leaves of the decision tree. Returns self.tree_.n_leavesint Number of leaves.
doc_4184
Return a dictionary-based tree containing a function or class descriptors for each function and class defined in the module with a def or class statement. The returned dictionary maps module-level function and class names to their descriptors. Nested objects are entered into the children dictionary of their parent. As ...
doc_4185
Deletes the header with the given name. Fails silently if the header doesn’t exist. Case-insensitive.
doc_4186
Call and return the result of a method of the proxy’s referent. If proxy is a proxy whose referent is obj then the expression proxy._callmethod(methodname, args, kwds) will evaluate the expression getattr(obj, methodname)(*args, **kwds) in the manager’s process. The returned value will be a copy of the result of the ...
doc_4187
Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item function. If a.ndim is 0, then since the depth of the nested list is 0, it will not be a list at all,...
doc_4188
The request object used by default in Flask. Remembers the matched endpoint and view arguments. It is what ends up as request. If you want to replace the request object used you can subclass this and set request_class to your subclass. The request object is a Request subclass and provides all of the attributes Werkzeug...
doc_4189
Note: All the losses are added to the GraphKeys.LOSSES collection by default. Classes class Reduction: Types of loss reduction. Functions absolute_difference(...): Adds an Absolute Difference loss to the training procedure. add_loss(...): Adds a externally defined loss to the collection of losses. compute_weighted_los...
doc_4190
Return True if obj is either of: an instance of asyncio.Future, an instance of asyncio.Task, a Future-like object with a _asyncio_future_blocking attribute. New in version 3.5.
doc_4191
Write a bytes-like object data to the audio device: waits until the audio device is able to accept data, writes as much data as it will accept, and repeats until data has been completely written. If the device is in blocking mode (the default), this has the same effect as write(); writeall() is only useful in non-block...
doc_4192
Multiply the learning rate of each parameter group by the factor given in the specified function. When last_epoch=-1, sets initial lr as lr. Parameters optimizer (Optimizer) – Wrapped optimizer. lr_lambda (function or list) – A function which computes a multiplicative factor given an integer parameter epoch, or ...
doc_4193
Bases: enum.IntEnum An enumeration. BACK=8[source] FORWARD=9[source] LEFT=1[source] MIDDLE=2[source] RIGHT=3[source]
doc_4194
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters Xarray-like of shape (n_samples, n_features) Test samples. yarray-like of shap...
doc_4195
tf.compat.v1.train.import_meta_graph( meta_graph_or_file, clear_devices=False, import_scope=None, **kwargs ) This function takes a MetaGraphDef protocol buffer as input. If the argument is a file containing a MetaGraphDef protocol buffer , it constructs a protocol buffer from the file content. The function then ad...
doc_4196
tf.compat.v1.train.shuffle_batch( tensors, batch_size, capacity, min_after_dequeue, num_threads=1, seed=None, enqueue_many=False, shapes=None, allow_smaller_final_batch=False, shared_name=None, name=None ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updati...
doc_4197
Select button with number index. Callbacks will be triggered if eventson is True.
doc_4198
A bitmask or’ing together all the comparison flags above.
doc_4199
See Migration guide for more details. tf.compat.v1.split tf.split( value, num_or_size_splits, axis=0, num=None, name='split' ) See also tf.unstack. If num_or_size_splits is an integer, then value is split along the dimension axis into num_or_size_splits smaller tensors. This requires that value.shape[axis] is di...