_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_25800
Run test and return the result.
doc_25801
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_25802
Return a string indicating the HTTP request method. If Request.method is not None, return its value, otherwise return 'GET' if Request.data is None, or 'POST' if it’s not. This is only meaningful for HTTP requests. Changed in version 3.3: get_method now looks at the value of Request.method.
doc_25803
Return True if the period’s year is in a leap year.
doc_25804
See Migration guide for more details. tf.compat.v1.nest.map_structure tf.nest.map_structure( func, *structure, **kwargs ) Applies func(x[0], x[1], ...) where x[i] is an entry in structure[i]. All structures in structure must have the same arity, and the return value will contain results with the same structure l...
doc_25805
Change shape and size of array in-place. Parameters new_shapetuple of ints, or n ints Shape of resized array. refcheckbool, optional If False, reference count will not be checked. Default is True. Returns None Raises ValueError If a does not own its own data or references or views to it exist, and...
doc_25806
Return boolean flag, True if artist is included in layout calculations. E.g. Constrained Layout Guide, Figure.tight_layout(), and fig.savefig(fname, bbox_inches='tight').
doc_25807
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_25808
Given a quantized Tensor, self.int_repr() returns a CPU Tensor with uint8_t as data type that stores the underlying uint8_t values of the given Tensor.
doc_25809
os.F_TLOCK os.F_ULOCK os.F_TEST Flags that specify what action lockf() will take. Availability: Unix. New in version 3.3.
doc_25810
Return the arc cosine of x, in radians. The result is between 0 and pi.
doc_25811
Set to a non-ASCII name for a temporary file.
doc_25812
Accuracy classification score. In multilabel classification, this function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in y_true. Read more in the User Guide. Parameters y_true1d array-like, or label indicator array / sparse matrix Ground...
doc_25813
See Migration guide for more details. tf.compat.v1.keras.preprocessing.image.apply_affine_transform tf.keras.preprocessing.image.apply_affine_transform( x, theta=0, tx=0, ty=0, shear=0, zx=1, zy=1, row_axis=0, col_axis=1, channel_axis=2, fill_mode='nearest', cval=0.0, order=1 ) Arguments x 2D numpy ...
doc_25814
Performs a single optimization step. Parameters closure (callable) – A closure that reevaluates the model and returns the loss.
doc_25815
Open the given url (which can be a request object or a string), optionally passing the given data. Arguments, return values and exceptions raised are the same as those of urlopen() (which simply calls the open() method on the currently installed global OpenerDirector). The optional timeout parameter specifies a timeout...
doc_25816
def f(x): return x*x if __name__ == '__main__': with Pool(5) as p: print(p.map(f, [1, 2, 3])) will print to standard output [1, 4, 9] The Process class In multiprocessing, processes are spawned by creating a Process object and then calling its start() method. Process follows the API of threading.Thr...
doc_25817
Autoscale the scalar limits on the norm instance using the current array
doc_25818
Return the alpha value used for blending - not supported on all backends.
doc_25819
Loads the Torch serialized object at the given URL. If downloaded file is a zip file, it will be automatically decompressed. If the object is already present in model_dir, it’s deserialized and returned. The default value of model_dir is <hub_dir>/checkpoints where hub_dir is the directory returned by get_dir(). Par...
doc_25820
Bases: torch.distributions.exp_family.ExponentialFamily Creates a Bernoulli distribution parameterized by probs or logits (but not both). Samples are binary (0 or 1). They take the value 1 with probability p and 0 with probability 1 - p. Example: >>> m = Bernoulli(torch.tensor([0.3])) >>> m.sample() # 30% chance 1; ...
doc_25821
A tuple of five integers representing version information about the OpenSSL library: >>> ssl.OPENSSL_VERSION_INFO (1, 0, 2, 11, 15) New in version 3.2.
doc_25822
By default, Django’s admin uses a select-box interface (<select>) for fields that are ForeignKey. Sometimes you don’t want to incur the overhead of having to select all the related instances to display in the drop-down. raw_id_fields is a list of fields you would like to change into an Input widget for either a Foreign...
doc_25823
tf.debugging.assert_all_finite( x, message, name=None ) Args x Tensor to check. message Message to log on failure. name A name for this operation (optional). Returns Same tensor as x.
doc_25824
No-op in the base class, this method takes file object fp, and reads the data from the file, initializing its message catalog. If you have an unsupported message catalog file format, you should override this method to parse your format.
doc_25825
Return the standard deviation of the array elements along the given axis. Refer to numpy.std for full documentation. See also numpy.std Notes This is the same as ndarray.std, except that where an ndarray would be returned, a matrix object is returned instead. Examples >>> x = np.matrix(np.arange(12).reshape((3, 4...
doc_25826
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParametersGradAccumDebug tf.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParametersGradAccumDebug( parameters, gradient_accumulators, num_shards, shard_id, table_id=-1, table_name='', config='', name=None )...
doc_25827
See Migration guide for more details. tf.compat.v1.app.flags.CsvListSerializer tf.compat.v1.flags.CsvListSerializer( list_sep ) Methods serialize serialize( value ) Serializes a list as a CSV string or unicode.
doc_25828
True if this transform is separable in the x- and y- dimensions.
doc_25829
Like rfind, but raises ValueError when the substring sub is not found. See also char.rindex
doc_25830
See Migration guide for more details. tf.compat.v1.distribute.in_cross_replica_context tf.distribute.in_cross_replica_context() See tf.distribute.get_replica_context for details. assert not tf.distribute.in_cross_replica_context() with strategy.scope(): assert tf.distribute.in_cross_replica_context() def f(): ...
doc_25831
Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are: 'monotonic': time.monotonic() 'perf_counter': time.perf_counter() 'process_time': time.process_time() 'thread_time': time.thread_time() 'time': time.time() The result ...
doc_25832
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_25833
See Migration guide for more details. tf.compat.v1.raw_ops.FractionalAvgPoolGrad tf.raw_ops.FractionalAvgPoolGrad( orig_input_tensor_shape, out_backprop, row_pooling_sequence, col_pooling_sequence, overlapping=False, name=None ) Unlike FractionalMaxPoolGrad, we don't need to find arg_max for FractionalAvgPoo...
doc_25834
Apply a correction to raw Minimum Covariance Determinant estimates. Correction using the empirical correction factor suggested by Rousseeuw and Van Driessen in [RVD]. Parameters dataarray-like of shape (n_samples, n_features) The data matrix, with p features and n samples. The data set must be the one which was...
doc_25835
See Migration guide for more details. tf.compat.v1.raw_ops.Cumsum tf.raw_ops.Cumsum( x, axis, exclusive=False, reverse=False, name=None ) By default, this op performs an inclusive cumsum, which means that the first element of the input is identical to the first element of the output: tf.cumsum([a, b, c]) # => [...
doc_25836
Apply trees in the forest to X, return leaf indices. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, its dtype will be converted to dtype=np.float32. If a sparse matrix is provided, it will be converted into a sparse csr_matrix. Returns X_leavesndarr...
doc_25837
This class stores the message data in a cookie (signed with a secret hash to prevent manipulation) to persist notifications across requests. Old messages are dropped if the cookie data size would exceed 2048 bytes. Changed in Django 3.2: Messages format was changed to the RFC 6265 compliant format.
doc_25838
Default return value for get_redirect_field_name(). Defaults to "next".
doc_25839
Return the number of weak references and proxies which refer to object.
doc_25840
This function is called if the handle() method of a RequestHandlerClass instance raises an exception. The default action is to print the traceback to standard error and continue handling further requests. Changed in version 3.6: Now only called for exceptions derived from the Exception class.
doc_25841
Update this artist's properties from the dict props. Parameters propsdict
doc_25842
Get whether the widget is active.
doc_25843
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_25844
Given a list of tuples or FrameSummary objects as returned by extract_tb() or extract_stack(), return a list of strings ready for printing. Each string in the resulting list corresponds to the item with the same index in the argument list. Each string ends in a newline; the strings may contain internal newlines as well...
doc_25845
Run awaitable objects in the aws sequence concurrently. If any awaitable in aws is a coroutine, it is automatically scheduled as a Task. If all awaitables are completed successfully, the result is an aggregate list of returned values. The order of result values corresponds to the order of awaitables in aws. If return_e...
doc_25846
Finish any processing for writing the movie.
doc_25847
Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input v...
doc_25848
Set loop as a current event loop for the current OS thread.
doc_25849
class ast.Sub class ast.Mult class ast.Div class ast.FloorDiv class ast.Mod class ast.Pow class ast.LShift class ast.RShift class ast.BitOr class ast.BitXor class ast.BitAnd class ast.MatMult Binary operator tokens.
doc_25850
Alter Index or MultiIndex name. Able to set new names without level. Defaults to returning new index. Length of names must match number of levels in MultiIndex. Parameters name:label or list of labels Name(s) to set. inplace:bool, default False Modifies the object directly, instead of creating a new Index o...
doc_25851
Other Members ABORTED 10 ALREADY_EXISTS 6 CANCELLED 1 DATA_LOSS 15 DEADLINE_EXCEEDED 4 FAILED_PRECONDITION 9 INTERNAL 13 INVALID_ARGUMENT 3 NOT_FOUND 5 OK 0 OUT_OF_RANGE 11 PERMISSION_DENIED 7 RESOURCE_EXHAUSTED 8 UNAUTHENTICATED 16 ...
doc_25852
Hyperbolic sine, element-wise. Equivalent to 1/2 * (np.exp(x) - np.exp(-x)) or -1j * np.sin(1j*x). Parameters xarray_like Input array. outndarray, None, or tuple of ndarray and None, optional A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not p...
doc_25853
Boolean flag that is True if the field has a one-to-many relation, such as a GenericRelation or the reverse of a ForeignKey; False otherwise.
doc_25854
Built-in Functions abs() delattr() hash() memoryview() set() all() dict() help() min() setattr() any() dir() hex() next() slice() ascii() divmod() id() object() sorted() bin() enumerate() input() oct() staticmethod() bool() eval() int() open() str() breakpoint() exec() isinstance() ord() sum() byte...
doc_25855
tf.compat.v1.nn.sparse_softmax_cross_entropy_with_logits( _sentinel=None, labels=None, logits=None, name=None ) Measures the probability error in discrete classification tasks in which the classes are mutually exclusive (each entry is in exactly one class). For example, each CIFAR-10 image is labeled with one and ...
doc_25856
changes camera settings if supported by the camera set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness) Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in u...
doc_25857
The constructor doesn’t take any arguments and no content should be added to this response. Use this to designate that a page hasn’t been modified since the user’s last request (status code 304).
doc_25858
tf.optimizers.Nadam Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.optimizers.Nadam tf.keras.optimizers.Nadam( learning_rate=0.001, beta_1=0.9, beta_2=0.999, epsilon=1e-07, name='Nadam', **kwargs ) Much like Adam is essentially RMSprop with momentum, Nadam is Adam with ...
doc_25859
| 1.0 MobileNet-224 | 70.6 % | 529 | 4.2 | | 1.0 MobileNet-192 | 69.1 % | 529 | 4.2 | | 1.0 MobileNet-160 | 67.2 % | 529 | 4.2 | | 1.0 MobileNet-128 | 64.4 % | 529 | 4.2 | Reference: MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications Functions MobileNet(...): Instantiates the MobileNe...
doc_25860
Return the non-negative square-root of an array, element-wise. Parameters xarray_like The values whose square-roots are required. outndarray, None, or tuple of ndarray and None, optional A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provid...
doc_25861
Finds blobs in the given grayscale image. Blobs are found using the Determinant of Hessian method [1]. For each blob found, the method returns its coordinates and the standard deviation of the Gaussian Kernel used for the Hessian matrix whose determinant detected the blob. Determinant of Hessians is approximated usin...
doc_25862
Shuffle arrays or sparse matrices in a consistent way. This is a convenience alias to resample(*arrays, replace=False) to do random permutations of the collections. Parameters *arrayssequence of indexable data-structures Indexable data-structures can be arrays, lists, dataframes or scipy sparse matrices with co...
doc_25863
Numerical underflow with result rounded to zero. Occurs when a subnormal result is pushed to zero by rounding. Inexact and Subnormal are also signaled.
doc_25864
Subtract one polynomial from another. Returns the difference of two polynomials c1 - c2. The arguments are sequences of coefficients from lowest order term to highest, i.e., [1,2,3] represents the polynomial 1 + 2*x + 3*x**2. Parameters c1, c2array_like 1-D arrays of polynomial coefficients ordered from low to ...
doc_25865
tf.experimental.numpy.arctanh( x ) Unsupported arguments: out, where, casting, order, dtype, subok, signature, extobj. See the NumPy documentation for numpy.arctanh.
doc_25866
Casts this storage to short type
doc_25867
Remove “small” “trailing” coefficients from a polynomial. “Small” means “small in absolute value” and is controlled by the parameter tol; “trailing” means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be “trimme...
doc_25868
A Cmd instance or subclass instance is a line-oriented interpreter framework. There is no good reason to instantiate Cmd itself; rather, it’s useful as a superclass of an interpreter class you define yourself in order to inherit Cmd’s methods and encapsulate action methods. The optional argument completekey is the read...
doc_25869
Returns a new deque object initialized left-to-right (using append()) with data from iterable. If iterable is not specified, the new deque is empty. Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, memory efficient append...
doc_25870
Return a string representing the given POSIX timestamp controlled by an explicit format string. Parameters format:str Format string to convert Timestamp to string. See strftime documentation for more information on the format string: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior...
doc_25871
Scalar method identical to the corresponding array attribute. Please see ndarray.argmin.
doc_25872
See Migration guide for more details. tf.compat.v1.config.experimental_connect_to_cluster tf.config.experimental_connect_to_cluster( cluster_spec_or_resolver, job_name='localhost', task_index=0, protocol=None, make_master_device_default=True, cluster_device_filters=None ) Will make devices on the cluster ava...
doc_25873
Return the sketch parameters for the artist. Returns tuple or None A 3-tuple with the following elements: scale: The amplitude of the wiggle perpendicular to the source line. length: The length of the wiggle along the line. randomness: The scale factor by which the length is shrunken or expanded. Returns Non...
doc_25874
sklearn.manifold.spectral_embedding(adjacency, *, n_components=8, eigen_solver=None, random_state=None, eigen_tol=0.0, norm_laplacian=True, drop_first=True) [source] Project the sample on the first eigenvectors of the graph Laplacian. The adjacency matrix is used to compute a normalized graph Laplacian whose spectrum...
doc_25875
See Migration guide for more details. tf.compat.v1.distribute.experimental.CommunicationOptions tf.distribute.experimental.CommunicationOptions( bytes_per_pack=0, timeout_seconds=None, implementation=tf.distribute.experimental.CollectiveCommunication.AUTO ) This can be passed to methods like tf.distribute.ge...
doc_25876
Set or clear the mask array. Parameters maskNone or bool array of length ntri
doc_25877
enable fake rendering of bold text set_bold(bool) -> None Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with...
doc_25878
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_25879
See Migration guide for more details. tf.compat.v1.random.gamma, tf.compat.v1.random_gamma tf.random.gamma( shape, alpha, beta=None, dtype=tf.dtypes.float32, seed=None, name=None ) alpha is the shape parameter describing the distribution(s), and beta is the inverse scale parameter(s). Note: Because internal cal...
doc_25880
A list containing 2-tuples of TestCase instances and strings holding formatted tracebacks. Each tuple represents a test where a failure was explicitly signalled using the TestCase.assert*() methods.
doc_25881
Returns weekday of first day of the month and number of days in month, for the specified year and month.
doc_25882
Fetches all (remaining) rows of a query result, returning a list. Note that the cursor’s arraysize attribute can affect the performance of this operation. An empty list is returned when no rows are available.
doc_25883
'__main__': block or moved to a separate file. Just make sure it’s not called because this will always start a local WSGI server which we do not want if we deploy that application to uWSGI. Starting your app with uwsgi uwsgi is designed to operate on WSGI callables found in python modules. Given a flask application in...
doc_25884
An extra-trees regressor. This class implements a meta estimator that fits a number of randomized decision trees (a.k.a. extra-trees) on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting. Read more in the User Guide. Parameters n_estimatorsint, defau...
doc_25885
Returns the boundary as a newly allocated Geometry object.
doc_25886
sklearn.cluster.mean_shift(X, *, bandwidth=None, seeds=None, bin_seeding=False, min_bin_freq=1, cluster_all=True, max_iter=300, n_jobs=None) [source] Perform mean shift clustering of data using a flat kernel. Read more in the User Guide. Parameters Xarray-like of shape (n_samples, n_features) Input data. band...
doc_25887
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_25888
Open a bzip2-compressed file in binary mode. If filename is a str or bytes object, open the named file directly. Otherwise, filename should be a file object, which will be used to read or write the compressed data. The mode argument can be either 'r' for reading (default), 'w' for overwriting, 'x' for exclusive creatio...
doc_25889
A one-character string used by the writer to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if doublequote is False. On reading, the escapechar removes any special meaning from the following character. It defaults to None, which disables escaping.
doc_25890
Rename categories. Parameters new_categories:list-like, dict-like or callable New categories which will replace old categories. list-like: all items must be unique and the number of items in the new categories must match the existing number of categories. dict-like: specifies a mapping from old categories to n...
doc_25891
See Migration guide for more details. tf.compat.v1.fake_quant_with_min_max_vars_gradient, tf.compat.v1.quantization.fake_quant_with_min_max_vars_gradient tf.quantization.fake_quant_with_min_max_vars_gradient( gradients, inputs, min, max, num_bits=8, narrow_range=False, name=None ) Args gradients A Tenso...
doc_25892
Maps request attributes to environment variables. This works not only for the Werkzeug request object, but also any other class with an environ attribute: >>> class Test(object): ... environ = {'key': 'value'} ... test = environ_property('key') >>> var = Test() >>> var.test 'value' If you pass it a second valu...
doc_25893
Return immediately if the sound driver is busy. Note This flag is not supported on modern Windows platforms.
doc_25894
Compute the inverse hyperbolic tangent of x. Return the “principal value” (for a description of this, see numpy.arctanh) of arctanh(x). For real x such that abs(x) < 1, this is a real number. If abs(x) > 1, or if x is complex, the result is complex. Finally, x = 1 returns``inf`` and x=-1 returns -inf. Parameters ...
doc_25895
codecs.BOM_BE codecs.BOM_LE codecs.BOM_UTF8 codecs.BOM_UTF16 codecs.BOM_UTF16_BE codecs.BOM_UTF16_LE codecs.BOM_UTF32 codecs.BOM_UTF32_BE codecs.BOM_UTF32_LE These constants define various byte sequences, being Unicode byte order marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 d...
doc_25896
See Migration guide for more details. tf.compat.v1.raw_ops.RefIdentity tf.raw_ops.RefIdentity( input, name=None ) Args input A mutable Tensor. name A name for the operation (optional). Returns A mutable Tensor. Has the same type as input.
doc_25897
The offset argument must be specified as a timedelta object representing the difference between the local time and UTC. It must be strictly between -timedelta(hours=24) and timedelta(hours=24), otherwise ValueError is raised. The name argument is optional. If specified it must be a string that will be used as the value...
doc_25898
Returns a value equal to Emin - prec + 1 which is the minimum exponent value for subnormal results. When underflow occurs, the exponent is set to Etiny.
doc_25899
Multiply one Hermite series by another. Returns the product of two Hermite series c1 * c2. The arguments are sequences of coefficients, from lowest order “term” to highest, e.g., [1,2,3] represents the series P_0 + 2*P_1 + 3*P_2. Parameters c1, c2array_like 1-D arrays of Hermite series coefficients ordered from...