_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_12000
Module unittest Writing PyUnit regression tests. Module doctest Tests embedded in documentation strings. Writing Unit Tests for the test package It is preferred that tests that use the unittest module follow a few guidelines. One is to name the test module by starting it with test_ and end it with the name of ...
doc_12001
tf.compat.v1.nn.fractional_avg_pool( value, pooling_ratio, pseudo_random=False, overlapping=False, deterministic=False, seed=0, seed2=0, name=None ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: seed2 and deterministic args are deprecated. Use fraction...
doc_12002
See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNBackpropV2 tf.raw_ops.CudnnRNNBackpropV2( input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, rnn_mode='lstm', input_mode='linear_input', dir...
doc_12003
Perform round operation on the data to the specified freq. Parameters freq:str or Offset The frequency level to round the index to. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for a list of possible freq values. ambiguous:‘infer’, bool-ndarray, ‘NaT’, default ‘raise...
doc_12004
[Deprecated] Notes Deprecated since version 3.4:
doc_12005
True if the response has been closed.
doc_12006
Calls a database stored procedure with the given name. A sequence (params) or dictionary (kparams) of input parameters may be provided. Most databases don’t support kparams. Of Django’s built-in backends, only Oracle supports it. For example, given this stored procedure in an Oracle database: CREATE PROCEDURE "TEST_PRO...
doc_12007
Returns the indices that would sort this array. Refer to numpy.argsort for full documentation. See also numpy.argsort equivalent function
doc_12008
Return whether the given event (in display coords) is in the Axes.
doc_12009
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_12010
This is the quantized version of InstanceNorm2d. Additional args: scale - quantization scale of the output, type: double. zero_point - quantization zero point of the output, type: long.
doc_12011
See Migration guide for more details. tf.compat.v1.raw_ops.HSVToRGB tf.raw_ops.HSVToRGB( images, name=None ) Outputs a tensor of the same shape as the images tensor, containing the RGB value of the pixels. The output is only well defined if the value in images are in [0,1]. See rgb_to_hsv for a description of th...
doc_12012
Returns the variance of the matrix elements, along the given axis. Refer to numpy.var for full documentation. See also numpy.var Notes This is the same as ndarray.var, 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_12013
Return the marker edge color. See also set_markeredgecolor.
doc_12014
Appends whitespace to the subtree to indent the tree visually. This can be used to generate pretty-printed XML output. tree can be an Element or ElementTree. space is the whitespace string that will be inserted for each indentation level, two space characters by default. For indenting partial subtrees inside of an alre...
doc_12015
Return absolute path of file in the DataSource directory. If path is an URL, then abspath will return either the location the file exists locally or the location it would exist when opened using the open method. Parameters pathstr Can be a local file or a remote URL. Returns outstr Complete path, includ...
doc_12016
Get the matrix for the affine part of this transform.
doc_12017
The flag is set when the code object is an asynchronous generator function. When the code object is executed it returns an asynchronous generator object. See PEP 525 for more details. New in version 3.6.
doc_12018
Return int position of the largest value in the Series. If the maximum is achieved in multiple locations, the first row position is returned. Parameters axis:{None} Dummy argument for consistency with Series. skipna:bool, default True Exclude NA/null values when showing the result. *args, **kwargs Additio...
doc_12019
Return a tuple containing the names of methods declared in the class.
doc_12020
Prunes tensor corresponding to parameter called name in module by removing the specified amount of (currently unpruned) channels along the specified dim selected at random. Modifies module in place (and also return the modified module) by: 1) adding a named buffer called name+'_mask' corresponding to the binary mask ...
doc_12021
Delete the line under the cursor. All following lines are moved up by one line.
doc_12022
Log in on an SMTP server that requires authentication. The arguments are the username and the password to authenticate with. If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. This method will return normally if the authentication was successful, or may raise the follow...
doc_12023
from myapp.serializers import UserSerializer from rest_framework import generics from rest_framework.permissions import IsAdminUser class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer permission_classes = [IsAdminUser] For more complex cases you migh...
doc_12024
Set the CapStyle. Parameters sCapStyle or {'butt', 'projecting', 'round'}
doc_12025
Determine whether code is in tableA.1 (Unassigned code points in Unicode 3.2).
doc_12026
See Migration guide for more details. tf.compat.v1.sysconfig.get_lib tf.sysconfig.get_lib() Returns The directory as string.
doc_12027
See Migration guide for more details. tf.compat.v1.keras.layers.LeakyReLU tf.keras.layers.LeakyReLU( alpha=0.3, **kwargs ) It allows a small gradient when the unit is not active: f(x) = alpha * x if x < 0 f(x) = x if x >= 0 Usage: layer = tf.keras.layers.LeakyReLU() output = layer([-3.0, -1.0, 0.0, 2.0]) list(...
doc_12028
assertGreaterEqual(first, second, msg=None) assertLess(first, second, msg=None) assertLessEqual(first, second, msg=None) Test that first is respectively >, >=, < or <= than second depending on the method name. If not, the test will fail: >>> self.assertGreaterEqual(3, 4) AssertionError: "3" unexpectedly not great...
doc_12029
Load the Labeled Faces in the Wild (LFW) people dataset (classification). Download it if necessary. Classes 5749 Samples total 13233 Dimensionality 5828 Features real, between 0 and 255 Read more in the User Guide. Parameters data_homestr, default=None Specify another download and cache folder for the...
doc_12030
Plot the phase spectrum. Compute the phase spectrum (unwrapped angle spectrum) of x. Data is padded to a length of pad_to and the windowing function window is applied to the signal. Parameters x1-D array or sequence Array or sequence containing the data Fsfloat, default: 2 The sampling frequency (samples pe...
doc_12031
Alters flag dispositions for messages in mailbox. command is specified by section 6.4.6 of RFC 2060 as being one of “FLAGS”, “+FLAGS”, or “-FLAGS”, optionally with a suffix of “.SILENT”. For example, to set the delete flag on all messages: typ, data = M.search(None, 'ALL') for num in data[0].split(): M.store(num, '+...
doc_12032
lookup_name = 'minute'
doc_12033
Return a network interface name corresponding to an interface index number. OSError if no interface with the given index exists. Availability: Unix, Windows. New in version 3.3. Changed in version 3.8: Windows support was added. See also “Interface name” is a name as documented in if_nameindex().
doc_12034
Duplicate a socket and prepare it for sharing with a target process. The target process must be provided with process_id. The resulting bytes object can then be passed to the target process using some form of interprocess communication and the socket can be recreated there using fromshare(). Once this method has been c...
doc_12035
Return the linestyle.
doc_12036
Pads tensor. Padding size: The padding size by which to pad some dimensions of input are described starting from the last dimension and moving forward. ⌊len(pad)2⌋\left\lfloor\frac{\text{len(pad)}}{2}\right\rfloor dimensions of input will be padded. For example, to pad only the last dimension of the input tensor, th...
doc_12037
The default session interface that stores sessions in signed cookies through the itsdangerous module. static digest_method() the hash function to use for the signature. The default is sha1 key_derivation = 'hmac' the name of the itsdangerous supported key derivation. The default is hmac. open_session(app,...
doc_12038
A class to handle HTTP Cookies.
doc_12039
tf.config.experimental.VirtualDeviceConfiguration Compat aliases for migration See Migration guide for more details. tf.compat.v1.config.LogicalDeviceConfiguration, tf.compat.v1.config.experimental.VirtualDeviceConfiguration tf.config.LogicalDeviceConfiguration( memory_limit=None, experimental_priority=None ) Th...
doc_12040
Return the Transform instance used by this artist offset.
doc_12041
lookup_name = 'date' output_field = DateField() Changed in Django 3.2: The tzinfo parameter was added.
doc_12042
Returns a clone of self with given hyperparameters theta. Parameters thetandarray of shape (n_dims,) The hyperparameters
doc_12043
Get an attribute, raising unittest.SkipTest if AttributeError is raised.
doc_12044
Temporarily sets the current theme to themename, apply specified settings and then restore the previous theme. Each key in settings is a style and each value may contain the keys ‘configure’, ‘map’, ‘layout’ and ‘element create’ and they are expected to have the same format as specified by the methods Style.configure()...
doc_12045
Returns a light-weight pointer to obj, which must be an instance of a ctypes type. offset defaults to zero, and must be an integer that will be added to the internal pointer value. byref(obj, offset) corresponds to this C code: (((char *)&obj) + offset) The returned object can only be used as a foreign function call p...
doc_12046
See Migration guide for more details. tf.compat.v1.histogram_fixed_width_bins tf.histogram_fixed_width_bins( values, value_range, nbins=100, dtype=tf.dtypes.int32, name=None ) Given the tensor values, this operation returns a rank 1 Tensor representing the indices of a histogram into which each element of values...
doc_12047
Replace values where the condition is False. The replacement is taken from other. Parameters cond:bool array-like with the same length as self Condition to select the values on. other:scalar, or array-like, default None Replacement if the condition is False. Returns pandas.Index A copy of self with va...
doc_12048
The CSS class for the whole month’s table (used by formatmonth()). The default value is "month". New in version 3.7.
doc_12049
Returns a Tensor of size size filled with 0. By default, the returned Tensor has the same torch.dtype and torch.device as this tensor. Parameters size (int...) – a list, tuple, or torch.Size of integers defining the shape of the output tensor. dtype (torch.dtype, optional) – the desired type of returned tensor. De...
doc_12050
from contextlib import contextmanager @contextmanager def captured_templates(app): recorded = [] def record(sender, template, context, **extra): recorded.append((template, context)) template_rendered.connect(record, app) try: yield recorded finally: template_rendered.disconn...
doc_12051
Set whether the artist is intended to be used in an animation. If True, the artist is excluded from regular drawing of the figure. You have to call Figure.draw_artist / Axes.draw_artist explicitly on the artist. This appoach is used to speed up animations using blitting. See also matplotlib.animation and Faster rende...
doc_12052
See Migration guide for more details. tf.compat.v1.estimator.export.PredictOutput tf.estimator.export.PredictOutput( outputs ) A generic prediction need not be either a classification or a regression. Named outputs must be provided as a dict from string to Tensor, Args outputs A Tensor or a dict of stri...
doc_12053
Create a new directory in the Directory table. There is a current component at each point in time for the directory, which is either explicitly created through start_component(), or implicitly when files are added for the first time. Files are added into the current component, and into the cab file. To create a directo...
doc_12054
Returns True if the string sql contains one or more complete SQL statements terminated by semicolons. It does not verify that the SQL is syntactically correct, only that there are no unclosed string literals and the statement is terminated by a semicolon. This can be used to build a shell for SQLite, as in the followin...
doc_12055
Casts all floating point parameters and buffers to float datatype. Returns self Return type Module
doc_12056
Generates n random samples for a given mean and standard deviation. Returns a list of float values. If seed is given, creates a new instance of the underlying random number generator. This is useful for creating reproducible results, even in a multi-threading context.
doc_12057
Register a file descriptor with the polling object. Future calls to the poll() method will then check whether the file descriptor has any pending I/O events. fd can be either an integer, or an object with a fileno() method that returns an integer. File objects implement fileno(), so they can also be used as the argumen...
doc_12058
Alias for set_antialiased.
doc_12059
Set the artist's clip path. Parameters pathPatch or Path or TransformedPath or None The clip path. If given a Path, transform must be provided as well. If None, a previously set clip path is removed. transformTransform, optional Only used if path is a Path, in which case the given Path is converted to a Tra...
doc_12060
An exception raised by DocTestRunner to signal that a doctest example’s actual output did not match its expected output. The constructor arguments are used to initialize the attributes of the same names.
doc_12061
Return the ydata. If orig is True, return the original data, else the processed data.
doc_12062
tf.compat.v1.lookup.StaticHashTable( initializer, default_value, name=None ) When running in graph mode, you must evaluate the tensor returned by tf.tables_initializer() before evaluating the tensor returned by this class's lookup() method. Example usage in graph mode: keys_tensor = tf.constant([1, 2]) vals_tensor...
doc_12063
Add a subfigure to this figure or subfigure. A subfigure has the same artist methods as a figure, and is logically the same as a figure, but cannot print itself. See Figure subfigures. Parameters nrows, ncolsint, default: 1 Number of rows/columns of the subfigure grid. squeezebool, default: True If True, ex...
doc_12064
Return the midpoint of the Interval.
doc_12065
'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_12066
Set the linestyle(s) for the collection. linestyle description '-' or 'solid' solid line '--' or 'dashed' dashed line '-.' or 'dashdot' dash-dotted line ':' or 'dotted' dotted line Alternatively a dash tuple of the following form can be provided: (offset, onoffseq), where onoffseq is an even length tup...
doc_12067
The minute of the period.
doc_12068
Return a tuple (y, x) of the height and width of the window.
doc_12069
Takes the inverse of the square matrix input. input can be batches of 2D square tensors, in which case this function would return a tensor composed of individual inverses. Supports real and complex input. Note torch.inverse() is deprecated. Please use torch.linalg.inv() instead. Note Irrespective of the original str...
doc_12070
The Tcl() function is a factory function which creates an object much like that created by the Tk class, except that it does not initialize the Tk subsystem. This is most often useful when driving the Tcl interpreter in an environment where one doesn’t want to create extraneous toplevel windows, or where one cannot (su...
doc_12071
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_12072
Sort an array in-place. Refer to numpy.sort for full documentation. Parameters axisint, optional Axis along which to sort. Default is -1, which means sort along the last axis. kind{‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’}, optional Sorting algorithm. The default is ‘quicksort’. Note that both ‘stable...
doc_12073
Return the text string.
doc_12074
Ward clustering based on a Feature matrix. Recursively merges the pair of clusters that minimally increases within-cluster variance. The inertia matrix uses a Heapq-based representation. This is the structured version, that takes into account some topological structure between samples. Read more in the User Guide. P...
doc_12075
Compute max of group values. Parameters numeric_only:bool, default False Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. min_count:int, default -1 The required number of valid values to perform the operation. If fewer than min_count non-NA value...
doc_12076
bytearray.ljust(width[, fillbyte]) Return a copy of the object left justified in a sequence of length width. Padding is done using the specified fillbyte (default is an ASCII space). For bytes objects, the original sequence is returned if width is less than or equal to len(s). Note The bytearray version of this meth...
doc_12077
'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_12078
Alias for get_linestyle.
doc_12079
Return the decision path in the forest. New in version 0.18. 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 ind...
doc_12080
identify(x, y) Returns the name of the element at position x y, or the empty string if the point does not lie within any element. x and y are pixel coordinates relative to the widget. instate(statespec, callback=None, *args, **kw) Test the widget’s state. If a callback is not specified, returns True if the wi...
doc_12081
See Migration guide for more details. tf.compat.v1.ifft3d, tf.compat.v1.signal.ifft3d, tf.compat.v1.spectral.ifft3d tf.signal.ifft3d( input, name=None ) Computes the inverse 3-dimensional discrete Fourier transform over the inner-most 3 dimensions of input. Args input A Tensor. Must be one of the follow...
doc_12082
Encode the bytes-like object s, which can contain arbitrary binary data, and return bytes containing the base64-encoded data, with newlines (b'\n') inserted after every 76 bytes of output, and ensuring that there is a trailing newline, as per RFC 2045 (MIME). New in version 3.1.
doc_12083
The number of array dimensions.
doc_12084
See Migration guide for more details. tf.compat.v1.estimator.MultiLabelHead tf.estimator.MultiLabelHead( n_classes, weight_column=None, thresholds=None, label_vocabulary=None, loss_reduction=losses_utils.ReductionV2.SUM_OVER_BATCH_SIZE, loss_fn=None, classes_for_class_based_metrics=None, name=None ) Mult...
doc_12085
There was an error parsing a text declaration in an external entity.
doc_12086
Return the roots of a polynomial with coefficients given in p. 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 values in the rank-1 array p are coefficients of a...
doc_12087
Rearranges elements in a tensor of shape (∗,C×r2,H,W)(*, C \times r^2, H, W) to a tensor of shape (∗,C,H×r,W×r)(*, C, H \times r, W \times r) , where r is the upscale_factor. See PixelShuffle for details. Parameters input (Tensor) – the input tensor upscale_factor (int) – factor to increase spatial resolution by ...
doc_12088
Register a function that can respond to XML-RPC requests. If name is given, it will be the method name associated with function, otherwise function.__name__ will be used. name is a string, and may contain characters not legal in Python identifiers, including the period character. This method can also be used as a decor...
doc_12089
See torch.cummax()
doc_12090
Sort an array in-place. Refer to numpy.sort for full documentation. Parameters axisint, optional Axis along which to sort. Default is -1, which means sort along the last axis. kind{‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’}, optional Sorting algorithm. The default is ‘quicksort’. Note that both ‘stable...
doc_12091
The categories of this categorical. Setting assigns new values to each category (effectively a rename of each individual category). The assigned value has to be a list-like object. All items must be unique and the number of items in the new categories must be the same as the number of items in the old categories. Ass...
doc_12092
Return the message’s envelope header. Defaults to None if the envelope header was never set.
doc_12093
The UUID as a 128-bit integer.
doc_12094
sklearn.feature_extraction.image.img_to_graph(img, *, mask=None, return_as=<class 'scipy.sparse.coo.coo_matrix'>, dtype=None) [source] Graph of the pixel-to-pixel gradient connections Edges are weighted with the gradient values. Read more in the User Guide. Parameters imgndarray of shape (height, width) or (heigh...
doc_12095
Bases: matplotlib.backends.backend_webagg_core.FigureManagerWebAgg ToolbarCls[source] alias of matplotlib.backends.backend_nbagg.NavigationIPy clearup_closed()[source] Clear up any closed Comms. propertyconnected destroy()[source] display_js()[source] classmethodget_javascript(stream=None)[s...
doc_12096
Return a Triangulation object from the args and kwargs, and the remaining args and kwargs with the consumed values removed. There are two alternatives: either the first argument is a Triangulation object, in which case it is returned, or the args and kwargs are sufficient to create a new Triangulation to return. In t...
doc_12097
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_12098
Return a copy of the code object with new values for the specified fields. New in version 3.8.
doc_12099
sklearn.model_selection.check_cv(cv=5, y=None, *, classifier=False) [source] Input checker utility for building a cross-validator Parameters cvint, cross-validation generator or an iterable, default=None Determines the cross-validation splitting strategy. Possible inputs for cv are: - None, to use the default 5...