_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_21900
Count occurrences of pattern in each string of the Series/Index. This function is used to count the number of times a particular regex pattern is repeated in each of the string elements of the Series. Parameters pat:str Valid regular expression. flags:int, default 0, meaning no flags Flags for the re module...
doc_21901
Abstract class for invertable transformations with computable log det jacobians. They are primarily used in torch.distributions.TransformedDistribution. Caching is useful for transforms whose inverses are either expensive or numerically unstable. Note that care must be taken with memoized values since the autograd gr...
doc_21902
Identical to the unpack() function, using the compiled format. The buffer’s size in bytes must equal size.
doc_21903
Parameter arg should be a key-to-message mapping or an iterable of (key, message) pairs. Updates the mailbox so that, for each given key and message, the message corresponding to key is set to message as if by using __setitem__(). As with __setitem__(), each key must already correspond to a message in the mailbox or el...
doc_21904
Return the cumulative product of the elements along the given axis. Refer to numpy.cumprod for full documentation. See also numpy.cumprod equivalent function
doc_21905
The admin interface has the ability to edit models on the same page as a parent model. These are called inlines. Suppose you have these two models: from django.db import models class Author(models.Model): name = models.CharField(max_length=100) class Book(models.Model): author = models.ForeignKey(Author, on_del...
doc_21906
Number each item in each group from 0 to the length of that group - 1. Essentially this is equivalent to self.apply(lambda x: pd.Series(np.arange(len(x)), x.index)) Parameters ascending:bool, default True If False, number in reverse, from length of group - 1 to 0. Returns Series Sequence number of each...
doc_21907
Plot Receiver operating characteristic (ROC) curve. Extra keyword arguments will be passed to matplotlib’s plot. Read more in the User Guide. Parameters estimatorestimator instance Fitted classifier or a fitted Pipeline in which the last estimator is a classifier. X{array-like, sparse matrix} of shape (n_samp...
doc_21908
Return the Gamma function at x. New in version 3.2.
doc_21909
An abstract base class for asyncio policies. get_event_loop() Get the event loop for the current context. Return an event loop object implementing the AbstractEventLoop interface. This method should never return None. Changed in version 3.6. set_event_loop(loop) Set the event loop for the current context to...
doc_21910
Return True if all cased characters 4 in the string are uppercase and there is at least one cased character, False otherwise. >>> 'BANANA'.isupper() True >>> 'banana'.isupper() False >>> 'baNana'.isupper() False >>> ' '.isupper() False
doc_21911
Bases: matplotlib.ticker.Locator Tick at every integer mapping of the string data. Parameters units_mappingdict Mapping of category names (str) to indices (int). tick_values(vmin, vmax)[source] Return the values of the located ticks given vmin and vmax. Note To get tick locations with the vmin and vmax...
doc_21912
Controls where on the page the actions bar appears. By default, the admin changelist displays actions at the top of the page (actions_on_top = True; actions_on_bottom = False).
doc_21913
Deletes the test cookie. Use this to clean up after yourself.
doc_21914
Alias for set_linestyle.
doc_21915
assertNotRegex(text, regex, msg=None) Test that a regex search matches (or does not match) text. In case of failure, the error message will include the pattern and the text (or the pattern and the part of text that unexpectedly matched). regex may be a regular expression object or a string containing a regular expres...
doc_21916
modify the pitch of a channel. set_instrument(value=0, channel=0) -> None Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend ...
doc_21917
Returns True if the request Accept header matches the mime_type argument: >>> request.accepts('text/html') True Most browsers send Accept: */* by default, so this would return True for all content types. Setting an explicit Accept header in API requests can be useful for returning a different content type for those co...
doc_21918
Context manager for setting print options. Set print options for the scope of the with block, and restore the old options at the end. See set_printoptions for the full description of available options. See also set_printoptions, get_printoptions Examples >>> from numpy.testing import assert_equal >>> with np.pr...
doc_21919
Returns the set of permission strings the user_obj has, including both user permissions and group permissions. Returns an empty set if is_anonymous or is_active is False.
doc_21920
class ast.USub class ast.Not class ast.Invert Unary operator tokens. Not is the not keyword, Invert is the ~ operator. >>> print(ast.dump(ast.parse('not x', mode='eval'), indent=4)) Expression( body=UnaryOp( op=Not(), operand=Name(id='x', ctx=Load())))
doc_21921
Add an edge between u and v while updating max node id. See also networkx.Graph.add_edge().
doc_21922
Compute luminance of an RGB image. Parameters rgb(…, 3) array_like The image in RGB format. Final dimension denotes channels. Returns outndarray The luminance image - an array which is the same size as the input array, but with the channel dimension removed. Raises ValueError If rgb is not at leas...
doc_21923
The DndHandler class handles drag-and-drop events tracking Motion and ButtonRelease events on the root of the event widget. cancel(event=None) Cancel the drag-and-drop process. finish(event, commit=0) Execute end of drag-and-drop functions. on_motion(event) Inspect area below mouse for target objects wh...
doc_21924
Group the index labels by a given array of values. Parameters values:array Values used to determine the groups. Returns dict {group name -> group labels}
doc_21925
It requires no arguments at time of construction. However, you can use keyword arguments to specify some default headers. For example, this will send a User-Agent HTTP header in each request: >>> c = Client(HTTP_USER_AGENT='Mozilla/5.0') The values from the extra keyword arguments passed to get(), post(), etc. have pr...
doc_21926
See Migration guide for more details. tf.compat.v1.keras.layers.ReLU tf.keras.layers.ReLU( max_value=None, negative_slope=0, threshold=0, **kwargs ) With default values, it returns element-wise max(x, 0). Otherwise, it follows: f(x) = max_value if x >= max_value f(x) = x if threshold <= x < max_value f(x) = nega...
doc_21927
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_21928
See Migration guide for more details. tf.compat.v1.raw_ops.Shape tf.raw_ops.Shape( input, out_type=tf.dtypes.int32, name=None ) This operation returns a 1-D integer tensor representing the shape of input. For example: # 't' is [[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]] shape(t) ==> [2, 2, 3] Args i...
doc_21929
Toggle the selection state of each item in items. Changed in version 3.6: items can be passed as separate arguments, not just as a single tuple.
doc_21930
For baseclass, do nothing but collect events.
doc_21931
Return the alpha value used for blending - not supported on all backends.
doc_21932
Similar to the guess_type() function, using the tables stored as part of the object.
doc_21933
Loads the schedulers state. When saving or loading the scheduler, please make sure to also save or load the state of the optimizer. Parameters state_dict (dict) – scheduler state. Should be an object returned from a call to state_dict().
doc_21934
Special value that can be used as the stdin, stdout or stderr argument to Popen and indicates that the special file os.devnull will be used. New in version 3.3.
doc_21935
operator.__index__(a) Return a converted to an integer. Equivalent to a.__index__().
doc_21936
Return a random sample of items from an axis of object. You can use random_state for reproducibility. Parameters n:int, optional Number of items from axis to return. Cannot be used with frac. Default = 1 if frac = None. frac:float, optional Fraction of axis items to return. Cannot be used with n. replace:...
doc_21937
For complex tensors, this function returns a new tensor whose elemants have the same angle as that of the elements of input and absolute value 1. For a non-complex tensor, this function returns the signs of the elements of input (see torch.sign()). outi=0\text{out}_{i} = 0 , if ∣inputi∣==0|{\text{{input}}_i}| == 0 out...
doc_21938
Attributes key string key value Checker value
doc_21939
test if the Overlay is hardware accelerated get_hardware(rect) -> int Returns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used.
doc_21940
operator.__and__(a, b) Return the bitwise and of a and b.
doc_21941
Resolve a name to an object. This functionality is used in numerous places in the standard library (see bpo-12915) - and equivalent functionality is also in widely used third-party packages such as setuptools, Django and Pyramid. It is expected that name will be a string in one of the following formats, where W is shor...
doc_21942
See torch.addcdiv()
doc_21943
Returns tensor containing all values supported by a discrete distribution. The result will enumerate over dimension 0, so the shape of the result will be (cardinality,) + batch_shape + event_shape (where event_shape = () for univariate distributions). Note that this enumerates over all batched tensors in lock-step [[...
doc_21944
Return an attribute value as a node, given a namespaceURI and localName.
doc_21945
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_21946
convert a color into a mapped color value map_rgb(Color) -> mapped_int Convert an RGBA color into the mapped integer value for this Surface. The returned integer will contain no more bits than the bit depth of the Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that ...
doc_21947
The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.
doc_21948
A buffered binary stream providing higher-level access to a seekable RawIOBase raw binary stream. It inherits BufferedReader and BufferedWriter. The constructor creates a reader and writer for a seekable raw stream, given in the first argument. If the buffer_size is omitted it defaults to DEFAULT_BUFFER_SIZE. BufferedR...
doc_21949
Add a param group to the Optimizer s param_groups. This can be useful when fine tuning a pre-trained network as frozen layers can be made trainable and added to the Optimizer as training progresses. Parameters param_group (dict) – Specifies what Tensors should be optimized along with group optimization options. ...
doc_21950
Multiply a Hermite series by x. Multiply the Hermite series c by x, where x is the independent variable. Parameters carray_like 1-D array of Hermite series coefficients ordered from low to high. Returns outndarray Array representing the result of the multiplication. See also hermadd, hermsub, her...
doc_21951
Base class for creating enumerated constants that are also subclasses of int.
doc_21952
Returns the number of non-fixed hyperparameters of the kernel.
doc_21953
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 bbox_to_anchor unknown child unknown clip_box Bbox clip_on bool clip_pa...
doc_21954
os.MFD_ALLOW_SEALING os.MFD_HUGETLB os.MFD_HUGE_SHIFT os.MFD_HUGE_MASK os.MFD_HUGE_64KB os.MFD_HUGE_512KB os.MFD_HUGE_1MB os.MFD_HUGE_2MB os.MFD_HUGE_8MB os.MFD_HUGE_16MB os.MFD_HUGE_32MB os.MFD_HUGE_256MB os.MFD_HUGE_512MB os.MFD_HUGE_1GB os.MFD_HUGE_2GB os.MFD_HUGE_16GB These flags can...
doc_21955
The request was not successfully authenticated, and the highest priority authentication class does not use WWW-Authenticate headers. — An HTTP 403 Forbidden response will be returned. The request was not successfully authenticated, and the highest priority authentication class does use WWW-Authenticate headers. — An ...
doc_21956
See Migration guide for more details. tf.compat.v1.raw_ops.StatelessRandomUniformFullInt tf.raw_ops.StatelessRandomUniformFullInt( shape, seed, dtype=tf.dtypes.uint64, name=None ) The generated values are uniform integers covering the whole range of dtype. The outputs are a deterministic function of shape and se...
doc_21957
A byte string. When used in arrays, this type strips trailing null bytes. Character code 'S' Alias numpy.string_
doc_21958
Call open() with method set to GET. Parameters args (Any) – kw (Any) – Return type werkzeug.test.TestResponse
doc_21959
readline.get_endidx() Get the beginning or ending index of the completion scope. These indexes are the start and end arguments passed to the rl_attempted_completion_function callback of the underlying library.
doc_21960
Return a copy of the array. Parameters order{‘C’, ‘F’, ‘A’, ‘K’}, optional Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of a as closely as possible. (Note that this function and numpy.copy are ve...
doc_21961
Add text to the plot. kwargs will be passed on to Axes.text, except for the zdir keyword, which sets the direction to be used as the z direction.
doc_21962
Chebyshev points of the second kind. The Chebyshev points of the second kind are the points cos(x), where x = [pi*k/(npts - 1) for k in range(npts)]. Parameters nptsint Number of sample points desired. Returns ptsndarray The Chebyshev points of the second kind. Notes New in version 1.5.0.
doc_21963
See Migration guide for more details. tf.compat.v1.cumprod, tf.compat.v1.math.cumprod tf.math.cumprod( x, axis=0, exclusive=False, reverse=False, name=None ) By default, this op performs an inclusive cumprod, which means that the first element of the input is identical to the first element of the output: tf.math...
doc_21964
Round away from zero.
doc_21965
Bases: object A simple pyparsing-based parser for fontconfig patterns. parse(pattern)[source] Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object. matplotlib.fontconfig_pattern.family_escape(/, repl, string, count=0) Re...
doc_21966
where θ\theta are the parameters, α\alpha is the learning rate, rr is the reward and p(a∣πθ(s))p(a|\pi^\theta(s)) is the probability of taking action aa in state ss given policy πθ\pi^\theta . In practice we would sample an action from the output of a network, apply this action in an environment, and then use log...
doc_21967
Return the offsets for the collection.
doc_21968
Applies Batch Normalization over a N-Dimensional input (a mini-batch of [N-2]D inputs with additional channel dimension) as described in the paper Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift . y=x−E[x]Var[x]+ϵ∗γ+βy = \frac{x - \mathrm{E}[x]}{ \sqrt{\mathrm{Var}[x] + \...
doc_21969
This method checks if there is a breakpoint in the filename of the current frame.
doc_21970
Set the relative widths of the columns. width_ratios must be of length ncols. Each column gets a relative width of width_ratios[i] / sum(width_ratios).
doc_21971
tf.nn.swish Compat aliases for migration See Migration guide for more details. tf.compat.v1.nn.silu, tf.compat.v1.nn.swish tf.nn.silu( features ) The SiLU activation function was introduced in "Gaussian Error Linear Units (GELUs)" Hendrycks et al. 2016 and "Sigmoid-Weighted Linear Units for Neural Network Functi...
doc_21972
Called when the test case test signals a failure. err is a tuple of the form returned by sys.exc_info(): (type, value, traceback). The default implementation appends a tuple (test, formatted_err) to the instance’s failures attribute, where formatted_err is a formatted traceback derived from err.
doc_21973
The binary representation of this address - a bytes object of the appropriate length (most significant octet first). This is 4 bytes for IPv4 and 16 bytes for IPv6.
doc_21974
See torch.addmm()
doc_21975
A dict mapping from style name to RcParams defining that style. This is meant to be read-only. Use reload_library to update.
doc_21976
This attribute is a tuple (possibly of length 1) of generic types passed to the original __class_getitem__() of the generic container: >>> dict[str, list[int]].__args__ (<class 'str'>, list[int])
doc_21977
bytearray.rstrip([chars]) Return a copy of the sequence with specified trailing bytes removed. The chars argument is a binary sequence specifying the set of byte values to be removed - the name refers to the fact this method is usually used with ASCII characters. If omitted or None, the chars argument defaults to rem...
doc_21978
A decision tree classifier. Read more in the User Guide. Parameters criterion{“gini”, “entropy”}, default=”gini” The function to measure the quality of a split. Supported criteria are “gini” for the Gini impurity and “entropy” for the information gain. splitter{“best”, “random”}, default=”best” The strategy...
doc_21979
operator.le(a, b) operator.eq(a, b) operator.ne(a, b) operator.ge(a, b) operator.gt(a, b) operator.__lt__(a, b) operator.__le__(a, b) operator.__eq__(a, b) operator.__ne__(a, b) operator.__ge__(a, b) operator.__gt__(a, b) Perform “rich comparisons” between a and b. Specifically, lt(a, b) is equiva...
doc_21980
Return True if all characters in the string are printable or the string is empty, False otherwise. Nonprintable characters are those characters defined in the Unicode character database as “Other” or “Separator”, excepting the ASCII space (0x20) which is considered printable. (Note that printable characters in this con...
doc_21981
Returns a clone of self with given hyperparameters theta. Parameters thetandarray of shape (n_dims,) The hyperparameters
doc_21982
Match test to patterns set in set_match_tests().
doc_21983
Body-encode the string string. The type of encoding (base64 or quoted-printable) will be based on the body_encoding attribute.
doc_21984
class sklearn.cluster.OPTICS(*, min_samples=5, max_eps=inf, metric='minkowski', p=2, metric_params=None, cluster_method='xi', eps=None, xi=0.05, predecessor_correction=True, min_cluster_size=None, algorithm='auto', leaf_size=30, n_jobs=None) [source] Estimate clustering structure from vector array. OPTICS (Ordering P...
doc_21985
Filename of the image. str: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
doc_21986
In-place version of lgamma()
doc_21987
Convert angles from radians to degrees. Parameters xarray_like Input array in radians. 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 provided or None, a freshly-allocated array is re...
doc_21988
bytearray.removeprefix(prefix, /) If the binary data starts with the prefix string, return bytes[len(prefix):]. Otherwise, return a copy of the original binary data: >>> b'TestHook'.removeprefix(b'Test') b'Hook' >>> b'BaseTestCase'.removeprefix(b'Test') b'BaseTestCase' The prefix may be any bytes-like object. Note ...
doc_21989
Perform DBSCAN clustering from vector array or distance matrix. DBSCAN - Density-Based Spatial Clustering of Applications with Noise. Finds core samples of high density and expands clusters from them. Good for data which contains clusters of similar density. Read more in the User Guide. Parameters epsfloat, defau...
doc_21990
See Migration guide for more details. tf.compat.v1.raw_ops.MatrixDiag tf.raw_ops.MatrixDiag( diagonal, name=None ) Given a diagonal, this operation returns a tensor with the diagonal and everything else padded with zeros. The diagonal is computed as follows: Assume diagonal has k dimensions [I, J, K, ..., N], th...
doc_21991
Peak-to-peak (maximum - minimum) value along the given axis. Refer to numpy.ptp for full documentation. See also numpy.ptp Notes Same as ndarray.ptp, except, where that would return an ndarray object, this returns a matrix object. Examples >>> x = np.matrix(np.arange(12).reshape((3,4))); x matrix([[ 0, 1, 2, 3...
doc_21992
Set whether the legend box patch is drawn. Parameters bbool
doc_21993
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_21994
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 clip_box Bbox clip_on bool clip_path Patch or (Path, Transform) or None f...
doc_21995
Return the label position (top or bottom)
doc_21996
Set the snap setting which may be: True: snap vertices to the nearest pixel center False: leave vertices as-is None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center
doc_21997
Set the x, y and z data Parameters xarray-like The x-data to be plotted. yarray-like The y-data to be plotted. zarray-like The z-data to be plotted. Notes Accepts x, y, z arguments or a single array-like (x, y, z)
doc_21998
Returns the quotient and remainder of polynomial division. Note This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in numpy.polynomial is preferred. A summary of the differences can be found in the transition guide. The input arrays are the coefficients (including any coeff...
doc_21999
Contains the command (request type). For example, 'GET'.