_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_22800
Transform via the pointwise affine mapping y=loc+scale×xy = \text{loc} + \text{scale} \times x . Parameters loc (Tensor or float) – Location parameter. scale (Tensor or float) – Scale parameter. event_dim (int) – Optional size of event_shape. This should be zero for univariate random variables, 1 for distributi...
doc_22801
If tzinfo is None, returns None, else returns self.tzinfo.dst(self), and raises an exception if the latter doesn’t return None or a timedelta object with magnitude less than one day. Changed in version 3.7: The DST offset is not restricted to a whole number of minutes.
doc_22802
See torch.inner().
doc_22803
tf.keras.utils.custom_object_scope Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.utils.CustomObjectScope, tf.compat.v1.keras.utils.custom_object_scope tf.keras.utils.CustomObjectScope( *args ) Under a scope with custom_object_scope(objects_dict), Keras methods such as tf.k...
doc_22804
>>> b = np.array([2.0, 2.0, 2.0]) >>> a * b array([ 2., 4., 6.]) NumPy’s broadcasting rule relaxes this constraint when the arrays’ shapes meet certain constraints. The simplest broadcasting example occurs when an array and a scalar value are combined in an operation: >>> a = np.array([1.0, 2.0, 3.0]) >>> b = 2.0 >>...
doc_22805
Optional abstract method which writes the specified bytes to a file path. Any intermediate directories which do not exist are to be created automatically. When writing to the path fails because the path is read-only (errno.EACCES/PermissionError), do not propagate the exception. Changed in version 3.4: No longer raise...
doc_22806
tf.compat.v1.data.get_output_shapes( dataset_or_iterator ) Args dataset_or_iterator A tf.data.Dataset or tf.data.Iterator. Returns A nested structure of tf.TensorShape objects matching the structure of the dataset / iterator elements and specifying the shape of the individual components.
doc_22807
Write the pickled representation of the object obj to the open file object file. This is equivalent to Pickler(file, protocol).dump(obj). Arguments file, protocol, fix_imports and buffer_callback have the same meaning as in the Pickler constructor. Changed in version 3.8: The buffer_callback argument was added.
doc_22808
Write array to a file as text or binary (default). Data is always written in ‘C’ order, independent of the order of a. The data produced by this method can be recovered using the function fromfile(). Parameters fidfile or str or Path An open file object, or a string containing a filename. Changed in version 1....
doc_22809
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceMapper Methods get_effective_source_map View source get_effective_source_map() Returns a map (filename, lineno) -> (filename, lineno, function_name). reset View source reset() __enter__ View source __enter__() __exit__ V...
doc_22810
Constructor for a StreamWriter instance. All stream writers must provide this constructor interface. They are free to add additional keyword arguments, but only the ones defined here are used by the Python codec registry. The stream argument must be a file-like object open for writing text or binary data, as appropriat...
doc_22811
Detect existing (non-missing) values. Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True). NA values, such as None or numpy...
doc_22812
Clears an internal cache used by ContentType to keep track of models for which it has created ContentType instances. You probably won’t ever need to call this method yourself; Django will call it automatically when it’s needed.
doc_22813
Return list of grid lines as a list of paths (list of points). which : "major" or "minor" axis : "both", "x" or "y"
doc_22814
See Migration guide for more details. tf.compat.v1.keras.experimental.CosineDecayRestarts tf.keras.experimental.CosineDecayRestarts( initial_learning_rate, first_decay_steps, t_mul=2.0, m_mul=1.0, alpha=0.0, name=None ) See [Loshchilov & Hutter, ICLR2016], SGDR: Stochastic Gradient Descent with Warm Restarts...
doc_22815
Class that simulates a list. The instance’s contents are kept in a regular list, which is accessible via the data attribute of UserList instances. The instance’s contents are initially set to a copy of list, defaulting to the empty list []. list can be any iterable, for example a real Python list or a UserList object. ...
doc_22816
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_22817
Render a string representation of the Series. Parameters buf:StringIO-like, optional Buffer to write to. na_rep:str, optional String representation of NaN to use, default ‘NaN’. float_format:one-parameter function, optional Formatter function to apply to columns’ elements if they are floats, default Non...
doc_22818
Number of items allowed in the queue.
doc_22819
Look up the message id in the catalog and return the corresponding message string, as a Unicode string. If there is no entry in the catalog for the message id, and a fallback has been set, the look up is forwarded to the fallback’s gettext() method. Otherwise, the message id is returned.
doc_22820
tf.experimental.numpy.reshape( a, newshape, order='C' ) order argument can only b 'C' or 'F'. See the NumPy documentation for numpy.reshape.
doc_22821
This method of the Stats class accumulates additional profiling information into the current profiling object. Its arguments should refer to filenames created by the corresponding version of profile.run() or cProfile.run(). Statistics for identically named (re: file, line, name) functions are automatically accumulated ...
doc_22822
realm, uri, user, passwd are as for HTTPPasswordMgr.add_password(). is_authenticated sets the initial value of the is_authenticated flag for the given URI or list of URIs. If is_authenticated is specified as True, realm is ignored.
doc_22823
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceSparseApplyProximalAdagrad tf.raw_ops.ResourceSparseApplyProximalAdagrad( var, accum, lr, l1, l2, grad, indices, use_locking=False, name=None ) That is for rows we have grad for, we update var and accum as follows: accum += grad * grad prox_v = v...
doc_22824
See Migration guide for more details. tf.compat.v1.keras.layers.Permute tf.keras.layers.Permute( dims, **kwargs ) Useful e.g. connecting RNNs and convnets. Example: model = Sequential() model.add(Permute((2, 1), input_shape=(10, 64))) # now: model.output_shape == (None, 64, 10) # note: `None` is the batch dimens...
doc_22825
Return the offsets for the collection.
doc_22826
Return the sum along diagonals of the array. Refer to numpy.trace for full documentation. See also numpy.trace equivalent function
doc_22827
Parameters speed – an integer in the range 0..10 or a speedstring (see below) Set the turtle’s speed to an integer value in the range 0..10. If no argument is given, return current speed. If input is a number greater than 10 or smaller than 0.5, speed is set to 0. Speedstrings are mapped to speedvalues as follows: ...
doc_22828
Alias for torch.transpose(). This function is equivalent to NumPy’s swapaxes function. Examples: >>> x = torch.tensor([[[0,1],[2,3]],[[4,5],[6,7]]]) >>> x tensor([[[0, 1], [2, 3]], [[4, 5], [6, 7]]]) >>> torch.swapaxes(x, 0, 1) tensor([[[0, 1], [4, 5]], [[2, 3], [6, 7]]...
doc_22829
Return True if the line just read is the first line of its file, otherwise return False.
doc_22830
Scheduling policy for extremely low priority background tasks.
doc_22831
Set a trace function for all threads started from the threading module. The func will be passed to sys.settrace() for each thread, before its run() method is called.
doc_22832
See Migration guide for more details. tf.compat.v1.keras.initializers.normal, tf.compat.v1.keras.initializers.random_normal tf.compat.v1.keras.initializers.RandomNormal( mean=0.0, stddev=0.05, seed=None, dtype=tf.dtypes.float32 ) Args mean a python scalar or a scalar tensor. Mean of the random values to...
doc_22833
For a time t, str(t) is equivalent to t.isoformat().
doc_22834
Decorator to temporarily turn off tracing for the duration of the test.
doc_22835
Whenever the Axes state change, func(self) will be called.
doc_22836
Return minimum of an array or minimum along an axis, ignoring any NaNs. When all-NaN slices are encountered a RuntimeWarning is raised and Nan is returned for that slice. Parameters aarray_like Array containing numbers whose minimum is desired. If a is not an array, a conversion is attempted. axis{int, tuple ...
doc_22837
Set multiple properties at once. Supported properties are Property Description 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 axis_direction unknown backgroundcolor color bbox dict with properties for ...
doc_22838
Pseudo-Vandermonde matrix of given degree. Returns the pseudo-Vandermonde matrix of degree deg and sample points x. The pseudo-Vandermonde matrix is defined by \[V[..., i] = H_i(x),\] where 0 <= i <= deg. The leading indices of V index the elements of x and the last index is the degree of the Hermite polynomial. If ...
doc_22839
See Migration guide for more details. tf.compat.v1.raw_ops.ShardedFilespec tf.raw_ops.ShardedFilespec( basename, num_shards, name=None ) Args basename A Tensor of type string. num_shards A Tensor of type int32. name A name for the operation (optional). Returns A Tensor of type stri...
doc_22840
Return the value of an Artist's property, or print all of them. Parameters objArtist The queried artist; e.g., a Line2D, a Text, or an Axes. propertystr or None, default: None If property is 'somename', this function returns obj.get_somename(). If it's None (or unset), it prints all gettable properties from...
doc_22841
Returns the month for which this view will display data, as a string. Tries the following sources, in order: The value of the MonthMixin.month attribute. The value of the month argument captured in the URL pattern. The value of the month GET query argument. Raises a 404 if no valid month specification can be found.
doc_22842
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_22843
Returns a 1-D tensor of size ⌊end−startstep⌋+1\left\lfloor \frac{\text{end} - \text{start}}{\text{step}} \right\rfloor + 1 with values from start to end with step step. Step is the gap between two values in the tensor. outi+1=outi+step.\text{out}_{i+1} = \text{out}_i + \text{step}. Warning This function is depreca...
doc_22844
Open a persistent dictionary. The filename specified is the base filename for the underlying database. As a side-effect, an extension may be added to the filename and more than one file may be created. By default, the underlying database file is opened for reading and writing. The optional flag parameter has the same i...
doc_22845
Set the entire message object’s payload to payload. It is the client’s responsibility to ensure the payload invariants. Optional charset sets the message’s default character set; see set_charset() for details. This is a legacy method. On the EmailMessage class its functionality is replaced by set_content().
doc_22846
nis.match(key, mapname, domain=default_domain) Return the match for key in map mapname, or raise an error (nis.error) if there is none. Both should be strings, key is 8-bit clean. Return value is an arbitrary array of bytes (may contain NULL and other joys). Note that mapname is first checked if it is an alias to ano...
doc_22847
Returns a dictionary containing a whole state of the module. Both parameters and persistent buffers (e.g. running averages) are included. Keys are corresponding parameter and buffer names. Returns a dictionary containing a whole state of the module Return type dict Example: >>> module.state_dict().keys() ['bias',...
doc_22848
Performs the template substitution, returning a new string. mapping is any dictionary-like object with keys that match the placeholders in the template. Alternatively, you can provide keyword arguments, where the keywords are the placeholders. When both mapping and kwds are given and there are duplicates, the placehold...
doc_22849
assertIsNot(first, second, msg=None) Test that first and second are (or are not) the same object. New in version 3.1.
doc_22850
From the SessionMiddleware: A readable and writable, dictionary-like object that represents the current session.
doc_22851
tf.experimental.numpy.dsplit( ary, indices_or_sections ) See the NumPy documentation for numpy.dsplit.
doc_22852
Return the clip path in the form (path, transform), where path is a Path instance, and transform is an affine transform to apply to the path before clipping.
doc_22853
Returns a new instance of the session model object, which represents the current session state. Overriding this method provides the ability to modify session model data before it’s saved to database.
doc_22854
Container object exposing keys as attributes. Bunch objects are sometimes used as an output for functions and methods. They extend dictionaries by enabling values to be accessed by key, bunch["value_key"], or by an attribute, bunch.value_key. Examples >>> b = Bunch(a=1, b=2) >>> b['b'] 2 >>> b.b 2 >>> b.a = 3 >>> b['...
doc_22855
Return a tuple representing the dimensionality of the DataFrame. See also ndarray.shape Tuple of array dimensions. Examples >>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]}) >>> df.shape (2, 2) >>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4], ... 'col3': [5, 6]}) >>> df.shape ...
doc_22856
[Deprecated] Change subplot geometry, e.g., from (1, 1, 1) to (2, 2, 3). Notes Deprecated since version 3.4.
doc_22857
Alias for set_markeredgecolor.
doc_22858
Casts this storage to half type
doc_22859
Determine if an object list will be returned as part of the context. Returns make_object_list by default.
doc_22860
Return the x-axis view limits. Returns left, right(float, float) The current x-axis limits in data coordinates. See also set_xlim set_xbound, get_xbound invert_xaxis, xaxis_inverted Notes The x-axis may be inverted, in which case the left value will be greater than the right value.
doc_22861
Make an iterator that returns accumulated sums, or accumulated results of other binary functions (specified via the optional func argument). If func is supplied, it should be a function of two arguments. Elements of the input iterable may be any type that can be accepted as arguments to func. (For example, with the def...
doc_22862
Return True if the transport supports write_eof(), False if not.
doc_22863
Bases: matplotlib.axis.XAxis A theta Axis. This overrides certain properties of an XAxis to provide special-casing for an angular axis. Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains. a...
doc_22864
See Migration guide for more details. tf.compat.v1.keras.applications.vgg19.decode_predictions tf.keras.applications.vgg19.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. Returns A...
doc_22865
Compute Discounted Cumulative Gain. Sum the true scores ranked in the order induced by the predicted scores, after applying a logarithmic discount. This ranking metric yields a high value if true labels are ranked high by y_score. Usually the Normalized Discounted Cumulative Gain (NDCG, computed by ndcg_score) is pre...
doc_22866
Returns a 1-D tensor of size ⌈end−startstep⌉\left\lceil \frac{\text{end} - \text{start}}{\text{step}} \right\rceil with values from the interval [start, end) taken with common difference step beginning from start. Note that non-integer step is subject to floating point rounding errors when comparing against end; to av...
doc_22867
Bases: matplotlib.transforms.Affine2DBase A special class that does one thing, the identity transform, in a fast way. 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_22868
Please note that this function works like format_string() but will only work for exactly one %char specifier. For example, '%f' and '%.0f' are both valid specifiers, but '%f KiB' is not. For whole format strings, use format_string(). Deprecated since version 3.7: Use format_string() instead.
doc_22869
An ABC with one abstract method __round__ that is covariant in its return type.
doc_22870
Create a new figure manager instance.
doc_22871
Return True if the process exited terminated normally, that is, by calling exit() or _exit(), or by returning from main(); otherwise return False. Availability: Unix.
doc_22872
Return fast binary morphological erosion of an image. This function returns the same result as greyscale erosion but performs faster for binary images. Morphological erosion sets a pixel at (i,j) to the minimum over all pixels in the neighborhood centered at (i,j). Erosion shrinks bright regions and enlarges dark reg...
doc_22873
Yields (FormSet, InlineModelAdmin) pairs for use in admin add and change views. For example if you wanted to display a particular inline only in the change view, you could override get_formsets_with_inlines as follows: class MyModelAdmin(admin.ModelAdmin): inlines = [MyInline, SomeOtherInline] def get_formsets...
doc_22874
Fit model to data. Parameters Xarray-like of shape (n_samples, n_features) Training samples. Yarray-like of shape (n_samples,) or (n_samples, n_targets) Targets.
doc_22875
Returns the (flattened, log-transformed) non-fixed hyperparameters. Note that theta are typically the log-transformed values of the kernel’s hyperparameters as this representation of the search space is more amenable for hyperparameter search, as hyperparameters like length-scales naturally live on a log-scale. Return...
doc_22876
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_22877
Set or retrieve autoscaling margins. The padding added to each limit of the Axes is the margin times the data interval. All input parameters must be floats within the range [0, 1]. Passing both positional and keyword arguments is invalid and will raise a TypeError. If no arguments (positional or otherwise) are provid...
doc_22878
Read and return up to size bytes with only one call on the raw stream. If at least one byte is buffered, only buffered bytes are returned. Otherwise, one raw stream read call is made. Changed in version 3.7: The size argument is now optional.
doc_22879
Identical to the sub() function, using the compiled pattern.
doc_22880
See Migration guide for more details. tf.compat.v1.sparse.segment_mean tf.compat.v1.sparse_segment_mean( data, indices, segment_ids, name=None, num_segments=None ) Read the section on segmentation for an explanation of segments. Like tf.math.segment_mean, but segment_ids can have rank less than data's first dime...
doc_22881
set & other & ... Return a new set with elements common to the set and all others.
doc_22882
Add a callback that will be invoked after rendering has taken place. This hook can be used to defer certain processing operations (such as caching) until after rendering has occurred. If the SimpleTemplateResponse has already been rendered, the callback will be invoked immediately. When called, callbacks will be passed...
doc_22883
Draw samples from a standard Cauchy distribution with mode = 0. Also known as the Lorentz distribution. Parameters sizeint or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. Returns s...
doc_22884
Add an entry to the Component table, and make this component the current component for this directory. If no component name is given, the directory name is used. If no feature is given, the current feature is used. If no flags are given, the directory’s default flags are used. If no keyfile is given, the KeyPath is lef...
doc_22885
Return the Transform instance used by this artist.
doc_22886
A CliRunner for testing a Flask app’s CLI commands. Typically created using test_cli_runner(). See Testing CLI Commands. Parameters app (Flask) – kwargs (Any) – Return type None invoke(cli=None, args=None, **kwargs) Invokes a CLI command in an isolated environment. See CliRunner.invoke for full method d...
doc_22887
Draw samples from a Gumbel distribution. Draw samples from a Gumbel distribution with specified location and scale. For more information on the Gumbel distribution, see Notes and References below. Note New code should use the gumbel method of a default_rng() instance instead; please see the Quick Start. Parameters...
doc_22888
Measure the similarity of two clusterings of a set of points. New in version 0.18. The Fowlkes-Mallows index (FMI) is defined as the geometric mean between of the precision and recall: FMI = TP / sqrt((TP + FP) * (TP + FN)) Where TP is the number of True Positive (i.e. the number of pair of points that belongs in ...
doc_22889
Returns the list of children belonging to item. If item is not specified, returns root children.
doc_22890
tf.compat.v1.initialize_local_variables() Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2017-03-02. Instructions for updating: Use tf.local_variables_initializer instead. Note: The output of this function should be used. If it is not, a warning will be logged or an error may be raised. To mark the out...
doc_22891
Return True if the stat tuples stat1 and stat2 refer to the same file. These structures may have been returned by os.fstat(), os.lstat(), or os.stat(). This function implements the underlying comparison used by samefile() and sameopenfile(). Availability: Unix, Windows. Changed in version 3.4: Added Windows support. ...
doc_22892
Set the angle of the ellipse. Parameters anglefloat
doc_22893
Tells Django that this expression can be used as the source expression in Window. Defaults to False.
doc_22894
tf.keras.layers.GlobalAvgPool2D Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.layers.GlobalAveragePooling2D, tf.compat.v1.keras.layers.GlobalAvgPool2D tf.keras.layers.GlobalAveragePooling2D( data_format=None, **kwargs ) Examples: input_shape = (2, 4, 5, 3) x = tf.random.n...
doc_22895
Resampler.__iter__() Groupby iterator. Resampler.groups Dict {group name -> group labels}. Resampler.indices Dict {group name -> group indices}. Resampler.get_group(name[, obj]) Construct DataFrame from group with provided name. Function application Resampler.apply([func]) Aggregate using one or more ...
doc_22896
Constructor for the GzipFile class, which simulates most of the methods of a file object, with the exception of the truncate() method. At least one of fileobj and filename must be given a non-trivial value. The new class instance is based on fileobj, which can be a regular file, an io.BytesIO object, or any other objec...
doc_22897
Set array flags WRITEABLE, ALIGNED, (WRITEBACKIFCOPY and UPDATEIFCOPY), respectively. These Boolean-valued flags affect how numpy interprets the memory area used by a (see Notes below). The ALIGNED flag can only be set to True if the data is actually aligned according to the type. The WRITEBACKIFCOPY and (deprecated)...
doc_22898
Time whose absolute value is the time the system has been running and not suspended, providing accurate uptime measurement, both absolute and interval. Availability: FreeBSD, OpenBSD 5.5 or later. New in version 3.7.
doc_22899
Same as the standard C memset library function: fills the memory block at address dst with count bytes of value c. dst must be an integer specifying an address, or a ctypes instance.