_id
stringlengths
5
9
text
stringlengths
5
385k
title
stringclasses
1 value
doc_13100
Re-pack the fields of a structured array or dtype in memory. The memory layout of structured datatypes allows fields at arbitrary byte offsets. This means the fields can be separated by padding bytes, their offsets can be non-monotonically increasing, and they can overlap. This method removes any overlaps and reorder...
doc_13101
Change the file mode and permissions, like os.chmod(): >>> p = Path('setup.py') >>> p.stat().st_mode 33277 >>> p.chmod(0o444) >>> p.stat().st_mode 33060
doc_13102
See Migration guide for more details. tf.compat.v1.keras.utils.get_file tf.keras.utils.get_file( fname, origin, untar=False, md5_hash=None, file_hash=None, cache_subdir='datasets', hash_algorithm='auto', extract=False, archive_format='auto', cache_dir=None ) By default the file at the url origin is downl...
doc_13103
Spectral Co-Clustering algorithm (Dhillon, 2001). Clusters rows and columns of an array X to solve the relaxed normalized cut of the bipartite graph created from X as follows: the edge between row vertex i and column vertex j has weight X[i, j]. The resulting bicluster structure is block-diagonal, since each row and ...
doc_13104
Find a file in the texmf tree. Calls kpsewhich which is an interface to the kpathsea library [1]. Most existing TeX distributions on Unix-like systems use kpathsea. It is also available as part of MikTeX, a popular distribution on Windows. If the file is not found, an empty string is returned. Parameters filename...
doc_13105
Set the extra representation of the module To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
doc_13106
Trace of a memory block. The Snapshot.traces attribute is a sequence of Trace instances. Changed in version 3.6: Added the domain attribute. domain Address space of a memory block (int). Read-only property. tracemalloc uses the domain 0 to trace memory allocations made by Python. C extensions can use other domain...
doc_13107
If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised.
doc_13108
Draw samples from the geometric distribution. Bernoulli trials are experiments with one of two outcomes: success or failure (an example of such an experiment is flipping a coin). The geometric distribution models the number of trials that must be run in order to achieve success. It is therefore supported on the posit...
doc_13109
'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_13110
See Migration guide for more details. tf.compat.v1.raw_ops.Ceil tf.raw_ops.Ceil( x, name=None ) Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
doc_13111
See Migration guide for more details. tf.compat.v1.raw_ops.DepthToSpace tf.raw_ops.DepthToSpace( input, block_size, data_format='NHWC', name=None ) Rearranges data from depth into blocks of spatial data. This is the reverse transformation of SpaceToDepth. More specifically, this op outputs a copy of the input te...
doc_13112
tf.compat.v1.foldl( fn, elems, initializer=None, parallel_iterations=10, back_prop=True, swap_memory=False, name=None ) This foldl operator repeatedly applies the callable fn to a sequence of elements from first to last. The elements are made of the tensors unpacked from elems on dimension 0. The callable fn t...
doc_13113
Subelement factory. This function creates an element instance, and appends it to an existing element. The element name, attribute names, and attribute values can be either bytestrings or Unicode strings. parent is the parent element. tag is the subelement name. attrib is an optional dictionary, containing element attri...
doc_13114
Sets up the test environment by calling setup_test_environment() and setting DEBUG to self.debug_mode (defaults to False).
doc_13115
Simple stateless tool ToolToggleBase Tool that has two states, only one Toggle tool can be active at any given time for the same matplotlib.backend_managers.ToolManager classmatplotlib.backend_tools.AxisScaleBase(*args, **kwargs)[source] Bases: matplotlib.backend_tools.ToolToggleBase Base Tool to toggle betwee...
doc_13116
See Migration guide for more details. tf.compat.v1.linalg.logdet tf.linalg.logdet( matrix, name=None ) # Compute the determinant of a matrix while reducing the chance of over- or underflow: A = ... # shape 10 x 10 det = tf.exp(tf.linalg.logdet(A)) # scalar Args matrix A Tensor. Must be float16, float3...
doc_13117
class sklearn.base.ClusterMixin [source] Mixin class for all cluster estimators in scikit-learn. Methods fit_predict(X[, y]) Perform clustering on X and returns cluster labels. fit_predict(X, y=None) [source] Perform clustering on X and returns cluster labels. Parameters Xarray-like of shape (n_samples, n...
doc_13118
Call open() with method set to POST. Parameters args (Any) – kw (Any) – Return type werkzeug.test.TestResponse
doc_13119
Alias for torch.acosh().
doc_13120
The name of the file the syntax error occurred in.
doc_13121
Stderr output of the child process if it was captured by run(). Otherwise, None.
doc_13122
tf.experimental.numpy.asanyarray( a, dtype=None ) Unsupported arguments: order. See the NumPy documentation for numpy.asanyarray.
doc_13123
sklearn.datasets.make_friedman3(n_samples=100, *, noise=0.0, random_state=None) [source] Generate the “Friedman #3” regression problem. This dataset is described in Friedman [1] and Breiman [2]. Inputs X are 4 independent features uniformly distributed on the intervals: 0 <= X[:, 0] <= 100, 40 * pi <= X[:, 1] <= 560 ...
doc_13124
assertFalse(expr, msg=None) Test that expr is true (or false). Note that this is equivalent to bool(expr) is True and not to expr is True (use assertIs(expr, True) for the latter). This method should also be avoided when more specific methods are available (e.g. assertEqual(a, b) instead of assertTrue(a == b)), becau...
doc_13125
Incremental fit on a batch of samples. This method is expected to be called several times consecutively on different chunks of a dataset so as to implement out-of-core or online learning. This is especially useful when the whole dataset is too big to fit in memory at once. This method has some performance overhead he...
doc_13126
Differentiate. Return a series instance of that is the derivative of the current series. Parameters mnon-negative int Find the derivative of order m. Returns new_seriesseries A new series representing the derivative. The domain is the same as the domain of the differentiated series.
doc_13127
Set the antialiasing state for rendering. Parameters aabool or list of bools
doc_13128
String giving the prefix of method names which will be interpreted as test methods. The default value is 'test'. This affects getTestCaseNames() and all the loadTestsFrom*() methods.
doc_13129
Bases: mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase, mpl_toolkits.axes_grid1.mpl_axes.Axes [Deprecated] Notes Deprecated since version 3.5: Build an Axes in a figure. Parameters figFigure The Axes is built in the Figure fig. rect[left, bottom, width, height] The Axes is built in the rectangle rect. rec...
doc_13130
Computes the fractional portion of each element in input. outi=inputi−⌊∣inputi∣⌋∗sgn⁡(inputi)\text{out}_{i} = \text{input}_{i} - \left\lfloor |\text{input}_{i}| \right\rfloor * \operatorname{sgn}(\text{input}_{i}) Example: >>> torch.frac(torch.tensor([1, 2.5, -3.2])) tensor([ 0.0000, 0.5000, -0.2000])
doc_13131
A string giving the site-specific directory prefix where the platform independent Python files are installed; by default, this is the string '/usr/local'. This can be set at build time with the --prefix argument to the configure script. The main collection of Python library modules is installed in the directory prefix/...
doc_13132
Register func to be called when signal signal is generated.
doc_13133
Return the left coord of the rectangle.
doc_13134
Bases: matplotlib.transforms.Transform A composite transform formed by applying transform a then transform b. This "generic" version can handle any two arbitrary transformations. Create a new composite transform that is the result of applying transform a then transform b. You will generally not call this constructor ...
doc_13135
See torch.nanmedian()
doc_13136
See Migration guide for more details. tf.compat.v1.math.segment_mean, tf.compat.v1.segment_mean tf.math.segment_mean( data, segment_ids, name=None ) Read the section on segmentation for an explanation of segments. Computes a tensor such that \(output_i = \frac{\sum_j data_j}{N}\) where mean is over j such that s...
doc_13137
Return a list of the words in the string, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done, the rightmost ones. If sep is not specified or None, any whitespace string is a separator. Except for splitting from the right, rsplit() behaves like split() which is described in detail ...
doc_13138
Return a matrix of given shape and type, filled with zeros. Parameters shapeint or sequence of ints Shape of the matrix dtypedata-type, optional The desired data-type for the matrix, default is float. order{‘C’, ‘F’}, optional Whether to store the result in C- or Fortran-contiguous order, default is ‘C’...
doc_13139
Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used.
doc_13140
Compute Lasso path with coordinate descent The Lasso optimization function varies for mono and multi-outputs. For mono-output tasks it is: (1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1 For multi-output tasks it is: (1 / (2 * n_samples)) * ||Y - XW||^2_Fro + alpha * ||W||_21 Where: ||W||_21 = \sum_i \sqrt...
doc_13141
Set a.flat[n] = values[n] for all n in indices. Refer to numpy.put for full documentation. See also numpy.put equivalent function
doc_13142
Determine if two arrays might share memory A return of True does not necessarily mean that the two arrays share any element. It just means that they might. Only the memory bounds of a and b are checked by default. Parameters a, bndarray Input arrays max_workint, optional Effort to spend on solving the overl...
doc_13143
tf.keras.layers.MaxPooling2D Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.layers.MaxPool2D, tf.compat.v1.keras.layers.MaxPooling2D tf.keras.layers.MaxPool2D( pool_size=(2, 2), strides=None, padding='valid', data_format=None, **kwargs ) Downsamples the input representa...
doc_13144
test if one rectangle in a dictionary intersects collidedict(dict) -> (key, value) collidedict(dict) -> None collidedict(dict, use_values=0) -> (key, value) collidedict(dict, use_values=0) -> None Returns the first key and value pair that intersects with the calling Rect object. If no collisions are found, None is re...
doc_13145
Return a k length list of unique elements chosen from the population sequence or set. Used for random sampling without replacement. Returns a new list containing elements from the population while leaving the original population unchanged. The resulting list is in selection order so that all sub-slices will also be val...
doc_13146
Return the values of the located ticks given vmin and vmax. Note To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance: >>> print(type(loc)) <type 'Locator'> >>> print(loc()) [1, 2, 3, 4]
doc_13147
Parameters title – string prompt – string default – number (optional) minval – number (optional) maxval – number (optional) Pop up a dialog window for input of a number. title is the title of the dialog window, prompt is a text mostly describing what numerical information to input. default: default value, mi...
doc_13148
Perform classification on an array of test vectors X. Parameters Xarray-like of shape (n_samples, n_features) Returns Cndarray of shape (n_samples,) Predicted target values for X
doc_13149
Bases: matplotlib.artist.Artist, matplotlib.cm.ScalarMappable Base class for Collections. Must be subclassed to be usable. A Collection represents a sequence of Patches that can be drawn more efficiently together than individually. For example, when a single path is being drawn repeatedly at different offsets, the re...
doc_13150
Copy properties from other to self.
doc_13151
Write a bytes-like object data to the audio device and return the number of bytes written. If the audio device is in blocking mode (the default), the entire data is always written (again, this is different from usual Unix device semantics). If the device is in non-blocking mode, some data may not be written—see writeal...
doc_13152
Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise. See also char.isspace
doc_13153
Set the two sequences to be compared.
doc_13154
tf.compat.v1.saved_model.simple_save( session, export_dir, inputs, outputs, legacy_init_op=None ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.simple_sav...
doc_13155
Set the underlying transformation matrix from a 3x3 numpy array: a c e b d f 0 0 1 .
doc_13156
Returns the code object for name created from path.
doc_13157
Register the error handling function error_handler under the name name. The error_handler argument will be called during encoding and decoding in case of an error, when name is specified as the errors parameter. For encoding, error_handler will be called with a UnicodeEncodeError instance, which contains information ab...
doc_13158
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_13159
Logs a user out, then redirects to the login page. URL name: No default URL provided Optional arguments: login_url: The URL of the login page to redirect to. Defaults to settings.LOGIN_URL if not supplied.
doc_13160
See Migration guide for more details. tf.compat.v1.random.normal, tf.compat.v1.random_normal tf.random.normal( shape, mean=0.0, stddev=1.0, dtype=tf.dtypes.float32, seed=None, name=None ) Example that generates a new set of random values every time: tf.random.set_seed(5); tf.random.normal([4], 0, 1, tf.float32)...
doc_13161
All URLs provided by this factory have the subdomain set to a specific domain. For example if you want to use the subdomain for the current language this can be a good setup: url_map = Map([ Rule('/', endpoint='#select_language'), Subdomain('<string(length=2):lang_code>', [ Rule('/', endpoint='index'), ...
doc_13162
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_13163
tf.keras.activations.gelu( x, approximate=False ) Gaussian error linear unit (GELU) computes x * P(X <= x), where P(X) ~ N(0, 1). The (GELU) nonlinearity weights inputs by their value, rather than gates inputs by their sign as in ReLU. For example: x = tf.constant([-3.0, -1.0, 0.0, 1.0, 3.0], dtype=tf.float32) y ...
doc_13164
Return whether o owns this lock.
doc_13165
Check if the Index only consists of integers. Returns bool Whether or not the Index only consists of integers. See also is_boolean Check if the Index only consists of booleans. is_floating Check if the Index is a floating type. is_numeric Check if the Index only consists of numeric data. is_object Ch...
doc_13166
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'PAGE_SIZE': 100 } Note that you need to set both the pagination class, and the page size that should be used. Both DEFAULT_PAGINATION_CLASS and PAGE_SIZE are None by default. You can also set the pagination class on an individual v...
doc_13167
Do nothing by default. This exists so a subclass can override it. If persistent_id() returns None, obj is pickled as usual. Any other value causes Pickler to emit the returned value as a persistent ID for obj. The meaning of this persistent ID should be defined by Unpickler.persistent_load(). Note that the value return...
doc_13168
get the number of touch devices get_num_devices() -> int Return the number of available touch devices.
doc_13169
See Migration guide for more details. tf.compat.v1.tensor_scatter_nd_max tf.tensor_scatter_nd_max( tensor, indices, updates, name=None ) Args tensor A Tensor. Tensor to update. indices A Tensor. Must be one of the following types: int32, int64. Index tensor. updates A Tensor. Must have the s...
doc_13170
This is a symbolic constant used for different values returned by localeconv().
doc_13171
Return axis artist helper instance.
doc_13172
If flag is False, curses no longer considers using the hardware insert/delete character feature of the terminal; if flag is True, use of character insertion and deletion is enabled. When curses is first initialized, use of character insert/delete is enabled by default.
doc_13173
Alias for set_facecolor.
doc_13174
Bases: matplotlib.transforms.BboxTransformTo BboxTransformTo is a transformation that linearly transforms points from the unit bounding box to a given Bbox with a fixed upper left of (0, 0). Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout. __module__='matplotlib.tra...
doc_13175
See Migration guide for more details. tf.compat.v1.dynamic_partition tf.dynamic_partition( data, partitions, num_partitions, name=None ) For each index tuple js of size partitions.ndim, the slice data[js, ...] becomes part of outputs[partitions[js]]. The slices with partitions[js] = i are placed in outputs[i] in...
doc_13176
Scatters tensor across multiple GPUs. Parameters tensor (Tensor) – tensor to scatter. Can be on CPU or GPU. devices (Iterable[torch.device, str or int], optional) – an iterable of GPU devices, among which to scatter. chunk_sizes (Iterable[int], optional) – sizes of chunks to be placed on each device. It should ...
doc_13177
Get a list of artists contained in the figure.
doc_13178
The decorator to define a nn.Module with skip connections. Decorated modules are called “skippable”. This functionality works perfectly fine even when the module is not wrapped by Pipe. Each skip tensor is managed by its name. Before manipulating skip tensors, a skippable module must statically declare the names for ...
doc_13179
Set the current process’s real and effective user ids. Availability: Unix.
doc_13180
tf.optimizers.RMSprop Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.optimizers.RMSprop tf.keras.optimizers.RMSprop( learning_rate=0.001, rho=0.9, momentum=0.0, epsilon=1e-07, centered=False, name='RMSprop', **kwargs ) The gist of RMSprop is to: Maintain a moving (disc...
doc_13181
Plot coercing the axis to treat floats as dates. Discouraged This method exists for historic reasons and will be deprecated in the future. datetime-like data should directly be plotted using plot. If you need to plot plain numeric data as Matplotlib date format or need to set a timezone, call ax.xaxis.axis_date / ...
doc_13182
Removes the topmost item from the stack, will return the old value or None if the stack was already empty. Return type Any
doc_13183
Return True if Python was not built with -O0 or -Og.
doc_13184
tf.compat.v1.metrics.recall_at_k( labels, predictions, k, class_id=None, weights=None, metrics_collections=None, updates_collections=None, name=None ) If class_id is specified, we calculate recall by considering only the entries in the batch for which class_id is in the label, and computing the fraction of the...
doc_13185
Convert a PathPatch to a PathPatch3D object. Examples using mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d Draw flat objects in 3D plot
doc_13186
Create a new figure manager instance for the given figure.
doc_13187
Computes the Mean Squared Error between two covariance estimators. (In the sense of the Frobenius norm). Parameters comp_covarray-like of shape (n_features, n_features) The covariance to compare with. norm{“frobenius”, “spectral”}, default=”frobenius” The type of norm used to compute the error. Available er...
doc_13188
Return random integers from low (inclusive) to high (exclusive). Return random integers from the “discrete uniform” distribution of the specified dtype in the “half-open” interval [low, high). If high is None (the default), then results are from [0, low). Note New code should use the integers method of a default_rng...
doc_13189
Makes a HEAD request on the provided path and returns a Response object. This method works just like Client.get(), including the follow, secure and extra arguments, except it does not return a message body.
doc_13190
tf.compat.v1.assign( ref, value, validate_shape=None, use_locking=None, name=None ) This operation outputs a Tensor that holds the new value of ref after the value has been assigned. This makes it easier to chain operations that need to use the reset value. Args ref A mutable Tensor. Should be from a Vari...
doc_13191
numpy.int16 numpy.int32 numpy.int64 Aliases for the signed integer types (one of numpy.byte, numpy.short, numpy.intc, numpy.int_ and numpy.longlong) with the specified number of bits. Compatible with the C99 int8_t, int16_t, int32_t, and int64_t, respectively.
doc_13192
The display_name of the group. If it is None and there is exactly one Address in addresses, then the Group represents a single address that is not in a group.
doc_13193
[Deprecated] Notes Deprecated since version 3.4:
doc_13194
A null-terminated string.
doc_13195
See Migration guide for more details. tf.compat.v1.cholesky, tf.compat.v1.linalg.cholesky tf.linalg.cholesky( input, name=None ) The input is a tensor of shape [..., M, M] whose inner-most 2 dimensions form square matrices. The input has to be symmetric and positive definite. Only the lower-triangular part of th...
doc_13196
Return True if this network is a subnet of other. >>> a = ip_network('192.168.1.0/24') >>> b = ip_network('192.168.1.128/30') >>> b.subnet_of(a) True New in version 3.7.
doc_13197
Cumulative product for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
doc_13198
Check if the object is a file-like object. For objects to be considered file-like, they must be an iterator AND have either a read and/or write method as an attribute. Note: file-like objects must be iterable, but iterable objects need not be file-like. Parameters obj:The object to check Returns is_file_lik...
doc_13199
Perform classification on samples in X. For an one-class model, +1 or -1 is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples_test, n_samples_train) For kernel=”precomputed”, the expected shape of X is (n_samples_test, n_samples_train). Returns y_predndarray ...