_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_28100
Imports an object based on a string. This is useful if you want to use import paths as endpoints or something similar. An import path can be specified either in dotted notation (xml.sax.saxutils.escape) or with a colon as object delimiter (xml.sax.saxutils:escape). If silent is True the return value will be None if the...
doc_28101
See Migration guide for more details. tf.compat.v1.keras.preprocessing.image.array_to_img tf.keras.preprocessing.image.array_to_img( x, data_format=None, scale=True, dtype=None ) Usage: from PIL import Image img = np.random.random(size=(100, 100, 3)) pil_img = tf.keras.preprocessing.image.array_to_img(img) ...
doc_28102
Return the arc tangent of x. There are two branch cuts: One extends from 1j along the imaginary axis to ∞j, continuous from the right. The other extends from -1j along the imaginary axis to -∞j, continuous from the left.
doc_28103
skimage.draw.bezier_curve(r0, c0, r1, c1, …) Generate Bezier curve coordinates. skimage.draw.circle(r, c, radius[, shape]) Generate coordinates of pixels within circle. skimage.draw.circle_perimeter(r, c, radius) Generate circle perimeter coordinates. skimage.draw.circle_perimeter_aa(r, c, radius) Generate anti-a...
doc_28104
Returns an alternative filename based on the file_root and file_ext parameters, an underscore plus a random 7 character alphanumeric string is appended to the filename before the extension.
doc_28105
Match.end([group]) Return the indices of the start and end of the substring matched by group; group defaults to zero (meaning the whole matched substring). Return -1 if group exists but did not contribute to the match. For a match object m, and a group g that did contribute to the match, the substring matched by grou...
doc_28106
Returns sum(x^2) - sum(x)^2/N (“sum of squares” of the independent variable) as a float, or default if there aren’t any matching rows.
doc_28107
Defaults to True since most aggregate functions can be used as the source expression in Window.
doc_28108
Factory function for creating a subclass of Styler. Uses custom templates and Jinja environment. Changed in version 1.3.0. Parameters searchpath:str or list Path or paths of directories containing the templates. html_table:str Name of your custom template to replace the html_table template. New in versio...
doc_28109
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdagradParameters tf.raw_ops.LoadTPUEmbeddingAdagradParameters( parameters, accumulators, num_shards, shard_id, table_id=-1, table_name='', config='', name=None ) An op that loads optimization parameters into HBM for embedding. Must b...
doc_28110
Stain to RGB color space conversion. Parameters stains(…, 3) array_like The image in stain color space. Final dimension denotes channels. conv_matrix: ndarray The stain separation matrix as described by G. Landini [1]. Returns out(…, 3) ndarray The image in RGB format. Same dimensions as input. Rai...
doc_28111
Scans through the table and validates the given check constraint on existing rows.
doc_28112
Change the font family. May be either an alias (generic name is CSS parlance), such as: 'serif', 'sans-serif', 'cursive', 'fantasy', or 'monospace', a real font name or a list of real font names. Real font names are not supported when rcParams["text.usetex"] (default: False) is True.
doc_28113
Return the name of the Series. The name of a Series becomes its index or column name if it is used to form a DataFrame. It is also used whenever displaying the Series using the interpreter. Returns label (hashable object) The name of the Series, also the column name if part of a DataFrame. See also Series.r...
doc_28114
Removes the specified filter filter from this logger.
doc_28115
Applies a 1D adaptive average pooling over an input signal composed of several input planes. The output size is H, for any input size. The number of output features is equal to the number of input planes. Parameters output_size – the target output size H Examples >>> # target output size of 5 >>> m = nn.AdaptiveA...
doc_28116
The I/O mode for the file, either "r", "rw", or "w".
doc_28117
tf.experimental.numpy.diagflat( v, k=0 ) See the NumPy documentation for numpy.diagflat.
doc_28118
Set the points of the bounding box directly from a numpy array of the form: [[x0, y0], [x1, y1]]. No error checking is performed, as this method is mainly for internal use.
doc_28119
The path to the source file.
doc_28120
This is a relative of setattr(). The arguments are an object and a string. The string must be the name of one of the object’s attributes. The function deletes the named attribute, provided the object allows it. For example, delattr(x, 'foobar') is equivalent to del x.foobar.
doc_28121
Fit estimator using RANSAC algorithm. Parameters Xarray-like or sparse matrix, shape [n_samples, n_features] Training data. yarray-like of shape (n_samples,) or (n_samples, n_targets) Target values. sample_weightarray-like of shape (n_samples,), default=None Individual weights for each sample raises err...
doc_28122
The UUID version number (1 through 5, meaningful only when the variant is RFC_4122).
doc_28123
Similar to waitpid(), except no process id argument is given and a 3-element tuple containing the child’s process id, exit status indication, and resource usage information is returned. Refer to resource.getrusage() for details on resource usage information. The option argument is the same as that provided to waitpid()...
doc_28124
In-place version of ceil()
doc_28125
Load the covertype dataset (classification). Download it if necessary. Classes 7 Samples total 581012 Dimensionality 54 Features int Read more in the User Guide. Parameters data_homestr, default=None Specify another download and cache folder for the datasets. By default all scikit-learn data is stored...
doc_28126
enum.IntEnum collection of CERT_* constants. New in version 3.6.
doc_28127
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_28128
Boolean. Designates whether this user account should be considered active. We recommend that you set this flag to False instead of deleting accounts; that way, if your applications have any foreign keys to users, the foreign keys won’t break. This doesn’t necessarily control whether or not the user can log in. Authenti...
doc_28129
GraphModule is an nn.Module generated from an fx.Graph. Graphmodule has a graph attribute, as well as code and forward attributes generated from that graph. Warning When graph is reassigned, code and forward will be automatically regenerated. However, if you edit the contents of the graph without reassigning the gra...
doc_28130
Predict class probabilities for X. Parameters X{array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns parray of shape (n_samples, n_classes) The class probab...
doc_28131
Bases: matplotlib.transforms.BboxBase A Bbox that is automatically transformed by a given transform. When either the child bounding box or transform changes, the bounds of this bbox will update accordingly. Parameters bboxBbox transformTransform __init__(bbox, transform, **kwargs)[source] Parameters ...
doc_28132
See Migration guide for more details. tf.compat.v1.raw_ops.SparseCountSparseOutput tf.raw_ops.SparseCountSparseOutput( indices, values, dense_shape, weights, binary_output, minlength=-1, maxlength=-1, name=None ) Counts the number of times each value occurs in the input. Args indices A Tensor of typ...
doc_28133
Set the artist's visibility. Parameters bbool
doc_28134
tf.optimizers.serialize Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.optimizers.serialize tf.keras.optimizers.serialize( optimizer )
doc_28135
'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_28136
from myapp.serializers import PurchaseSerializer from rest_framework import generics class PurchaseList(generics.ListAPIView): serializer_class = PurchaseSerializer def get_queryset(self): """ This view should return a list of all the purchases for the currently authenticated user. ...
doc_28137
Reduce X to the selected features. Parameters Xarray of shape [n_samples, n_features] The input samples. Returns X_rarray of shape [n_samples, n_selected_features] The input samples with only the selected features.
doc_28138
Apply a function repeatedly over multiple axes. func is called as res = func(a, axis), where axis is the first element of axes. The result res of the function call must have either the same dimensions as a or one less dimension. If res has one less dimension than a, a dimension is inserted before axis. The call to fu...
doc_28139
Stamp a copy of the turtle shape onto the canvas at the current turtle position. Return a stamp_id for that stamp, which can be used to delete it by calling clearstamp(stamp_id). >>> turtle.color("blue") >>> turtle.stamp() 11 >>> turtle.fd(50)
doc_28140
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_28141
class socketserver.ForkingUDPServer class socketserver.ThreadingTCPServer class socketserver.ThreadingUDPServer These classes are pre-defined using the mix-in classes.
doc_28142
Abstract base class for objects that render into a FigureCanvas. Typically, all visible elements in a figure are subclasses of Artist.
doc_28143
Computes the inverse cosine of each element in input. outi=cos⁡−1(inputi)\text{out}_{i} = \cos^{-1}(\text{input}_{i}) Parameters input (Tensor) – the input tensor. Keyword Arguments out (Tensor, optional) – the output tensor. Example: >>> a = torch.randn(4) >>> a tensor([ 0.3348, -0.5889, 0.2005, -0.1584]) >>...
doc_28144
Return the number of processes in the system run queue averaged over the last 1, 5, and 15 minutes or raises OSError if the load average was unobtainable. Availability: Unix.
doc_28145
Turn this Graph into valid Python code. Parameters root_module (str) – The name of the root module on which to look-up qualified name targets. This is usually ‘self’. Returns The string source code generated from this Graph.
doc_28146
See Migration guide for more details. tf.compat.v1.raw_ops.Bincount tf.raw_ops.Bincount( arr, size, weights, name=None ) Outputs a vector with length size and the same dtype as weights. If weights are empty, then index i stores the number of times the value i is counted in arr. If weights are non-empty, then ind...
doc_28147
Close the transport immediately, without waiting for pending operations to complete. Buffered data will be lost. No more data will be received. The protocol’s protocol.connection_lost() method will eventually be called with None as its argument.
doc_28148
Subscribe to new mailbox.
doc_28149
String of ASCII characters which are considered punctuation characters in the C locale: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~.
doc_28150
Decompress the data, returning a bytes object containing the uncompressed data. New in version 3.2.
doc_28151
Apply the 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_28152
Draw a filled black rectangle from (x1, y1) to (x2, y2).
doc_28153
Called with data holding an arbitrary amount of received data. The default method, which must be overridden, raises a NotImplementedError exception.
doc_28154
tf.compat.v1.train.MonitoredSession( session_creator=None, hooks=None, stop_grace_period_secs=120 ) Example usage: saver_hook = CheckpointSaverHook(...) summary_hook = SummarySaverHook(...) with MonitoredSession(session_creator=ChiefSessionCreator(...), hooks=[saver_hook, summary_hook]) as se...
doc_28155
tf.compat.v1.train.warm_start( ckpt_to_initialize_from, vars_to_warm_start='.*', var_name_to_vocab_info=None, var_name_to_prev_var_name=None ) If you are using a tf.estimator.Estimator, this will automatically be called during training. Args ckpt_to_initialize_from [Required] A string specifying the d...
doc_28156
Returns a list of all hyperparameter specifications.
doc_28157
tupled integers of the version vernum = (1, 5, 3) This version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this: if pygame.version.vernum < (1, 5): print('Warning, older version of pygame (%s)' % pygame.version.ve...
doc_28158
See Migration guide for more details. tf.compat.v1.raw_ops.EnqueueTPUEmbeddingSparseBatch tf.raw_ops.EnqueueTPUEmbeddingSparseBatch( sample_indices, embedding_indices, aggregation_weights, mode_override, device_ordinal=-1, combiners=[], name=None ) This Op eases the porting of code that uses embedding_lookup...
doc_28159
Convert the input to a masked array, conserving subclasses. If a is a subclass of MaskedArray, its class is conserved. No copy is performed if the input is already an ndarray. Parameters aarray_like Input data, in any form that can be converted to an array. dtypedtype, optional By default, the data-type is ...
doc_28160
Evaluate the significance of a cross-validated score with permutations Permutes targets to generate ‘randomized data’ and compute the empirical p-value against the null hypothesis that features and targets are independent. The p-value represents the fraction of randomized data sets where the estimator performed as we...
doc_28161
Return the values (min, max) that are mapped to the colormap limits.
doc_28162
Autocorrelation plot for time series. Parameters series:Time series ax:Matplotlib axis object, optional **kwargs Options to pass to matplotlib plotting method. Returns class:matplotlib.axis.Axes Examples The horizontal lines in the plot correspond to 95% and 99% confidence bands. The dashed line is 9...
doc_28163
Return the data in the buffer as a bytestring. This is equivalent to calling the bytes constructor on the memoryview. >>> m = memoryview(b"abc") >>> m.tobytes() b'abc' >>> bytes(m) b'abc' For non-contiguous arrays the result is equal to the flattened list representation with all elements converted to bytes. tobytes() ...
doc_28164
See Migration guide for more details. tf.compat.v1.linalg.experimental.conjugate_gradient tf.linalg.experimental.conjugate_gradient( operator, rhs, preconditioner=None, x=None, tol=1e-05, max_iter=20, name='conjugate_gradient' ) Solves a linear system of equations A*x = rhs for self-adjoint, positive definit...
doc_28165
Reset the instance. Loses all unprocessed data. This is called implicitly at instantiation time.
doc_28166
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalParseExampleDataset tf.raw_ops.ExperimentalParseExampleDataset( input_dataset, num_parallel_calls, dense_defaults, sparse_keys, dense_keys, sparse_types, dense_shapes, output_types, output_shapes, sloppy=False, name=None ) Args inp...
doc_28167
The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
doc_28168
Register a custom template global, available application wide. Like Flask.add_template_global() but for a blueprint. Works exactly like the app_template_global() decorator. Changelog New in version 0.10. Parameters name (Optional[str]) – the optional name of the global, otherwise the function name will be used. ...
doc_28169
Converts tokens back into Python source code. The iterable must return sequences with at least two elements, the token type and the token string. Any additional sequence elements are ignored. The reconstructed script is returned as a single string. The result is guaranteed to tokenize back to match the input so that th...
doc_28170
operator.itemgetter(*items) Return a callable object that fetches item from its operand using the operand’s __getitem__() method. If multiple items are specified, returns a tuple of lookup values. For example: After f = itemgetter(2), the call f(r) returns r[2]. After g = itemgetter(2, 5, 3), the call g(r) returns (...
doc_28171
Return the default content type. Most messages have a default content type of text/plain, except for messages that are subparts of multipart/digest containers. Such subparts have a default content type of message/rfc822.
doc_28172
Yield images of the Gaussian pyramid formed by the input image. Recursively applies the pyramid_reduce function to the image, and yields the downscaled images. Note that the first image of the pyramid will be the original, unscaled image. The total number of images is max_layer + 1. In case all layers are computed, t...
doc_28173
Initialize self. See help(type(self)) for accurate signature.
doc_28174
The host mask, as an IPv4Address object.
doc_28175
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_28176
Retrieve the next item from the iterator by calling its __next__() method. If default is given, it is returned if the iterator is exhausted, otherwise StopIteration is raised.
doc_28177
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingFTRLParametersGradAccumDebug tf.raw_ops.LoadTPUEmbeddingFTRLParametersGradAccumDebug( parameters, accumulators, linears, gradient_accumulators, num_shards, shard_id, table_id=-1, table_name='', config='', name=None ) An op that loads ...
doc_28178
This function expands XInclude directives. elem is the root element. loader is an optional resource loader. If omitted, it defaults to default_loader(). If given, it should be a callable that implements the same interface as default_loader(). base_url is base URL of the original file, to resolve relative include file r...
doc_28179
tf.compat.v1.train.LooperThread( coord, timer_interval_secs, target=None, args=None, kwargs=None ) This thread class is intended to be used with a Coordinator. It repeatedly runs code specified either as target and args or by the run_loop() method. Before each run the thread checks if the coordinator has requested...
doc_28180
Deprecated enum-like class for reduction operations: SUM, PRODUCT, MIN, and MAX. ReduceOp is recommended to use instead.
doc_28181
See Migration guide for more details. tf.compat.v1.sets.difference, tf.compat.v1.sets.set_difference tf.sets.difference( a, b, aminusb=True, validate_indices=True ) All but the last dimension of a and b must match. Example: import tensorflow as tf import collections # Represent the following array of sets as a ...
doc_28182
See Migration guide for more details. tf.compat.v1.app.flags.IllegalFlagValueError
doc_28183
Retrieve a given field value. The key argument will be either an integer or a string. If it is an integer, it represents the index of the positional argument in args; if it is a string, then it represents a named argument in kwargs. The args parameter is set to the list of positional arguments to vformat(), and the kwa...
doc_28184
The earliest representable time, time(0, 0, 0, 0).
doc_28185
Standard kind of date increment used for a date range. Works exactly like the keyword argument form of relativedelta. Note that the positional argument form of relativedelata is not supported. Use of the keyword n is discouraged– you would be better off specifying n in the keywords you use, but regardless it is there...
doc_28186
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_28187
Returns an array containing the same data with a new shape. Refer to numpy.reshape for full documentation. See also numpy.reshape equivalent function Notes Unlike the free function numpy.reshape, this method on ndarray allows the elements of the shape parameter to be passed in as separate arguments. For example...
doc_28188
Set the normalization instance. Parameters normNormalize or None Notes If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default.
doc_28189
Bases: matplotlib.patches.Patch Connect two bboxes with a straight line. Parameters bbox1, bbox2matplotlib.transforms.Bbox Bounding boxes to connect. loc1{1, 2, 3, 4} Corner of bbox1 to draw the line. Valid values are: 'upper right' : 1, 'upper left' : 2, 'lower left' : 3, 'lower right' : 4 loc2{1,...
doc_28190
Returns a list of all hyperparameter specifications.
doc_28191
Yields ModuleInfo for all modules recursively on path, or, if path is None, all accessible modules. path should be either None or a list of paths to look for modules in. prefix is a string to output on the front of every module name on output. Note that this function must import all packages (not all modules!) on the g...
doc_28192
An abstract class representing a Dataset. All datasets that represent a map from keys to data samples should subclass it. All subclasses should overwrite __getitem__(), supporting fetching a data sample for a given key. Subclasses could also optionally overwrite __len__(), which is expected to return the size of the ...
doc_28193
See Migration guide for more details. tf.compat.v1.raw_ops.Assign tf.raw_ops.Assign( ref, value, validate_shape=True, use_locking=True, name=None ) This operation outputs "ref" after the assignment is done. This makes it easier to chain operations that need to use the reset value. Args ref A mutable Ten...
doc_28194
tf.compat.v1.batch_gather( params, indices, name=None ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2017-10-25. Instructions for updating: tf.batch_gather is deprecated, please use tf.gather with batch_dims=-1 instead.
doc_28195
Truncate series to length size. Reduce the series to length size by discarding the high degree terms. The value of size must be a positive integer. This can be useful in least squares where the coefficients of the high degree terms may be very small. Parameters sizepositive int The series is reduced to length s...
doc_28196
The Form instance this BoundField is bound to.
doc_28197
Mark the Future as done and set its result. Raises a InvalidStateError error if the Future is already done.
doc_28198
Create a montage of several single- or multichannel images. Create a rectangular montage from an input array representing an ensemble of equally shaped single- (gray) or multichannel (color) images. For example, montage(arr_in) called with the following arr_in 1 2 3 will return 1 2 3 where the ‘*’ patc...
doc_28199
Close file descriptor fd. Note This function is intended for low-level I/O and must be applied to a file descriptor as returned by os.open() or pipe(). To close a “file object” returned by the built-in function open() or by popen() or fdopen(), use its close() method.