_id stringlengths 5 9 | text stringlengths 5 385k | title stringclasses 1
value |
|---|---|---|
doc_13200 | A set object indicating which functions in the os module permit specifying their path parameter as an open file descriptor on the local platform. Different platforms provide different features, and the underlying functionality Python uses to accept open file descriptors as path arguments is not available on all platfor... | |
doc_13201 |
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_13202 |
Set the alpha blending value for all ContourSet artists. alpha must be between 0 (transparent) and 1 (opaque). | |
doc_13203 |
Returns an array containing the same data with a new shape. Refer to numpy.reshape for full documentation. See also numpy.reshape
equivalent function Notes Unlike the free function numpy.reshape, this method on ndarray allows the elements of the shape parameter to be passed in as separate arguments. For example... | |
doc_13204 | Does the complete dispatching process. view_func is called with the endpoint and a dict with the values for the view. It should look up the view function, call it, and return a response object or WSGI application. http exceptions are not caught by default so that applications can display nicer error messages by just ca... | |
doc_13205 | See Migration guide for more details. tf.compat.v1.config.experimental.set_synchronous_execution
tf.config.experimental.set_synchronous_execution(
enable
)
TensorFlow can execute operations synchronously or asynchronously. If asynchronous execution is enabled, operations may return "non-ready" handles. When enab... | |
doc_13206 | sklearn.metrics.r2_score(y_true, y_pred, *, sample_weight=None, multioutput='uniform_average') [source]
R^2 (coefficient of determination) regression score function. Best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). A constant model that always predicts the expected value... | |
doc_13207 | See Migration guide for more details. tf.compat.v1.nest.pack_sequence_as
tf.nest.pack_sequence_as(
structure, flat_sequence, expand_composites=False
)
If structure is a scalar, flat_sequence must be a single-element list; in this case the return value is flat_sequence[0]. If structure is or contains a dict insta... | |
doc_13208 |
The ContentFile class inherits from File, but unlike File it operates on string content (bytes also supported), rather than an actual file. For example: from django.core.files.base import ContentFile
f1 = ContentFile("esta frase está en español")
f2 = ContentFile(b"these are bytes") | |
doc_13209 |
Trim the leading and/or trailing zeros from a 1-D array or sequence. Parameters
filt1-D array or sequence
Input array.
trimstr, optional
A string with ‘f’ representing trim from front and ‘b’ to trim from back. Default is ‘fb’, trim zeros from both front and back of the array. Returns
trimmed1-D array... | |
doc_13210 | See Migration guide for more details. tf.compat.v1.saved_model.experimental.save, tf.compat.v1.saved_model.save
tf.saved_model.save(
obj, export_dir, signatures=None, options=None
)
Example usage: class Adder(tf.Module):
@tf.function(input_signature=[tf.TensorSpec(shape=None, dtype=tf.float32)])
def add(sel... | |
doc_13211 | See Migration guide for more details. tf.compat.v1.math.real, tf.compat.v1.real
tf.math.real(
input, name=None
)
Given a tensor input, this operation returns a tensor of type float that is the real part of each element in input considered as a complex number. For example: x = tf.constant([-2.25 + 4.75j, 3.25 + 5... | |
doc_13212 | See Migration guide for more details. tf.compat.v1.raw_ops.RetrieveTPUEmbeddingAdagradParameters
tf.raw_ops.RetrieveTPUEmbeddingAdagradParameters(
num_shards, shard_id, table_id=-1, table_name='', config='',
name=None
)
An op that retrieves optimization parameters from embedding to host memory. Must be prece... | |
doc_13213 |
Moves all model parameters and buffers to the XPU. This also makes associated parameters and buffers different objects. So it should be called before constructing optimizer if the module will live on XPU while being optimized. Parameters
device (int, optional) – if specified, all parameters will be copied to that d... | |
doc_13214 | This method should only be called by Executor implementations before executing the work associated with the Future and by unit tests. If the method returns False then the Future was cancelled, i.e. Future.cancel() was called and returned True. Any threads waiting on the Future completing (i.e. through as_completed() or... | |
doc_13215 |
SeedSequence mixes sources of entropy in a reproducible way to set the initial state for independent and very probably non-overlapping BitGenerators. Once the SeedSequence is instantiated, you can call the generate_state method to get an appropriately sized seed. Calling spawn(n) will create n SeedSequences that can ... | |
doc_13216 |
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_13217 | See Migration guide for more details. tf.compat.v1.decode_json_example, tf.compat.v1.io.decode_json_example
tf.io.decode_json_example(
json_examples, name=None
)
This op translates a tensor containing Example records, encoded using the standard JSON mapping, into a tensor containing the same records encoded as b... | |
doc_13218 |
Get the affine part of this transform. | |
doc_13219 | tf.compat.v1.image.resize_nearest_neighbor(
images, size, align_corners=False, name=None, half_pixel_centers=False
) | |
doc_13220 |
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | |
doc_13221 | Remove callback from the callbacks list. This method should only be used in low-level callback-based code. See the documentation of Future.remove_done_callback() for more details. | |
doc_13222 | Return True if the symbol is global. | |
doc_13223 | Return the name of the key numbered k as a bytes object. The name of a key generating printable ASCII character is the key’s character. The name of a control-key combination is a two-byte bytes object consisting of a caret (b'^') followed by the corresponding printable ASCII character. The name of an alt-key combinatio... | |
doc_13224 | Returns the natural (base e) logarithm of x. | |
doc_13225 | AnyStr is a type variable defined as AnyStr = TypeVar('AnyStr', str, bytes). It is meant to be used for functions that may accept any kind of string without allowing different kinds of strings to mix. For example: def concat(a: AnyStr, b: AnyStr) -> AnyStr:
return a + b
concat(u"foo", u"bar") # Ok, output has typ... | |
doc_13226 |
Predict the target for the provided data Parameters
Xarray-like of shape (n_queries, n_features), or (n_queries, n_indexed) if metric == ‘precomputed’
Test samples. Returns
yndarray of shape (n_queries,) or (n_queries, n_outputs), dtype=int
Target values. | |
doc_13227 | mmap.MADV_RANDOM
mmap.MADV_SEQUENTIAL
mmap.MADV_WILLNEED
mmap.MADV_DONTNEED
mmap.MADV_REMOVE
mmap.MADV_DONTFORK
mmap.MADV_DOFORK
mmap.MADV_HWPOISON
mmap.MADV_MERGEABLE
mmap.MADV_UNMERGEABLE
mmap.MADV_SOFT_OFFLINE
mmap.MADV_HUGEPAGE
mmap.MADV_NOHUGEPAGE
mmap.MADV_DONTDUMP
mmap.MADV_DODUMP
m... | |
doc_13228 |
Read SQL query or database table into a DataFrame. This function is a convenience wrapper around read_sql_table and read_sql_query (for backward compatibility). It will delegate to the specific function depending on the provided input. A SQL query will be routed to read_sql_query, while a database table name will be ... | |
doc_13229 |
Applies a multi-layer long short-term memory (LSTM) RNN to an input sequence. For each element in the input sequence, each layer computes the following function: it=σ(Wiixt+bii+Whiht−1+bhi)ft=σ(Wifxt+bif+Whfht−1+bhf)gt=tanh(Wigxt+big+Whght−1+bhg)ot=σ(Wioxt+bio+Whoht−1+bho)ct=ft⊙ct−1+it⊙gtht=ot⊙tanh(ct)\begin{array... | |
doc_13230 |
Similar to equals, but checks that object attributes and types are also equal. Returns
bool
If two Index objects have equal elements and same type True, otherwise False. | |
doc_13231 | Similar to the findall() function, using the compiled pattern, but also accepts optional pos and endpos parameters that limit the search region like for search(). | |
doc_13232 |
Compute the complex-valued frequency 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 per time unit). It is used to calcu... | |
doc_13233 | See Migration guide for more details. tf.compat.v1.train.ExponentialMovingAverage
tf.train.ExponentialMovingAverage(
decay, num_updates=None, zero_debias=False,
name='ExponentialMovingAverage'
)
When training a model, it is often beneficial to maintain moving averages of the trained parameters. Evaluations t... | |
doc_13234 | class sklearn.kernel_approximation.AdditiveChi2Sampler(*, sample_steps=2, sample_interval=None) [source]
Approximate feature map for additive chi2 kernel. Uses sampling the fourier transform of the kernel characteristic at regular intervals. Since the kernel that is to be approximated is additive, the components of t... | |
doc_13235 |
Compare two "image" files checking differences within a tolerance. The two given filenames may point to files which are convertible to PNG via the converter dictionary. The underlying RMS is calculated with the calculate_rms function. Parameters
expectedstr
The filename of the expected image.
actualstr
The ... | |
doc_13236 | Return the message’s Content-Type parameters, as a list. The elements of the returned list are 2-tuples of key/value pairs, as split on the '=' sign. The left hand side of the '=' is the key, while the right hand side is the value. If there is no '=' sign in the parameter the value is the empty string, otherwise the va... | |
doc_13237 |
Returns the pickle of the array as a string. pickle.loads will convert the string back to an array. Parameters
None | |
doc_13238 |
Return the month names of the DateTimeIndex with specified locale. Parameters
locale:str, optional
Locale determining the language in which to return the month name. Default is English locale. Returns
Index
Index of month names. Examples
>>> idx = pd.date_range(start='2018-01', freq='M', periods=3)
>... | |
doc_13239 | Similar to the min() method, but the comparison is done using the absolute values of the operands. | |
doc_13240 | Sent when a user logs in successfully. Arguments sent with this signal:
sender The class of the user that just logged in.
request The current HttpRequest instance.
user The user instance that just logged in. | |
doc_13241 | curses.newwin(nlines, ncols, begin_y, begin_x)
Return a new window, whose left-upper corner is at (begin_y, begin_x), and whose height/width is nlines/ncols. By default, the window will extend from the specified position to the lower right corner of the screen. | |
doc_13242 |
Remove the observer with connection id cid. | |
doc_13243 | If flag is True, getch() will be non-blocking. | |
doc_13244 | WKBWriter provides the most control over its output. By default it returns OGC-compliant WKB when its write method is called. However, it has properties that allow for the creation of EWKB, a superset of the WKB standard that includes additional information. See the WKBWriter.outdim documentation for more details about... | |
doc_13245 | Returns the log-transformed bounds on the theta. Returns
boundsndarray of shape (n_dims, 2)
The log-transformed bounds on the kernel’s hyperparameters theta | |
doc_13246 | If your site uses Django’s authentication system, you can use the force_login() method to simulate the effect of a user logging into the site. Use this method instead of login() when a test requires a user be logged in and the details of how a user logged in aren’t important. Unlike login(), this method skips the authe... | |
doc_13247 |
Return the mode(s) of the Series. The mode is the value that appears most often. There can be multiple modes. Always returns Series even if only one value is returned. Parameters
dropna:bool, default True
Don’t consider counts of NaN/NaT. Returns
Series
Modes of the Series in sorted order. | |
doc_13248 |
Detects the soft boundary of the set of samples X. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Set of samples, where n_samples is the number of samples and n_features is the number of features.
sample_weightarray-like of shape (n_samples,), default=None
Per-sample weights. Resca... | |
doc_13249 |
Number of dimensions of broadcasted result. For code intended for NumPy 1.12.0 and later the more consistent ndim is preferred. Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.nd
2 | |
doc_13250 |
Return a list of the child Artists of this Artist. | |
doc_13251 | Returns a list of points outlining an object outline() -> [(x, y), ...] outline(every=1) -> [(x, y), ...] Returns a list of points of the outline of the first connected component encountered in the mask. To find a connected component, the mask is searched per row (left to right) starting in the top left corner. The e... | |
doc_13252 | Deprecated since version 3.3. Base class for opening and reading URLs. Unless you need to support opening objects using schemes other than http:, ftp:, or file:, you probably want to use FancyURLopener. By default, the URLopener class sends a User-Agent header of urllib/VVV, where VVV is the urllib version number. Ap... | |
doc_13253 | Get the quota root’s resource usage and limits. This method is part of the IMAP4 QUOTA extension defined in rfc2087. | |
doc_13254 | Raises a ValidationError with a code of 'min_length' if the length of value is less than limit_value, which may be a callable. | |
doc_13255 |
Bases: matplotlib.backend_bases.Event An event triggered by a draw operation on the canvas. In most backends, callbacks subscribed to this event will be fired after the rendering is complete but before the screen is updated. Any extra artists drawn to the canvas's renderer will be reflected without an explicit call t... | |
doc_13256 | See Migration guide for more details. tf.compat.v1.sparse.fill_empty_rows, tf.compat.v1.sparse_fill_empty_rows
tf.sparse.fill_empty_rows(
sp_input, default_value, name=None
)
This op adds entries with the specified default_value at index [row, 0] for any row in the input that does not already have a value. For e... | |
doc_13257 | Return the median (middle value) of numeric data, using the common “mean of middle two” method. If data is empty, StatisticsError is raised. data can be a sequence or iterable. The median is a robust measure of central location and is less affected by the presence of outliers. When the number of data points is odd, the... | |
doc_13258 |
Decorator for test cases that generate and compare two figures. The decorated function must take two keyword arguments, fig_test and fig_ref, and draw the test and reference images on them. After the function returns, the figures are saved and compared. This decorator should be preferred over image_comparison when po... | |
doc_13259 |
Extracts patches from a collection of images Read more in the User Guide. New in version 0.9. Parameters
patch_sizetuple of int (patch_height, patch_width), default=None
The dimensions of one patch.
max_patchesint or float, default=None
The maximum number of patches per image to extract. If max_patches is... | |
doc_13260 | Split the pathname path into a pair, (head, tail) where tail is the last pathname component and head is everything leading up to that. The tail part will never contain a slash; if path ends in a slash, tail will be empty. If there is no slash in path, head will be empty. If path is empty, both head and tail are empty. ... | |
doc_13261 |
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_13262 | The dispatcher class is a thin wrapper around a low-level socket object. To make it more useful, it has a few methods for event-handling which are called from the asynchronous loop. Otherwise, it can be treated as a normal non-blocking socket object. The firing of low-level events at certain times or in certain connect... | |
doc_13263 |
Return the cursor data for a given event. Note This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. Cursor data can be used by Artists to provide additional context information for a given event. The default implementation ju... | |
doc_13264 |
Quantile-based discretization function. Discretize variable into equal-sized buckets based on rank or based on sample quantiles. For example 1000 values for 10 quantiles would produce a Categorical object indicating quantile membership for each data point. Parameters
x:1d ndarray or Series
q:int or list-like of... | |
doc_13265 | tf.optimizers.Ftrl Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.optimizers.Ftrl
tf.keras.optimizers.Ftrl(
learning_rate=0.001, learning_rate_power=-0.5, initial_accumulator_value=0.1,
l1_regularization_strength=0.0, l2_regularization_strength=0.0,
name='Ftrl', l2_s... | |
doc_13266 | Compute probabilities of possible outcomes for samples in X. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Returns
avgarray-like of shape (n_samples, n_classes)
Weighted average probability for each class per sample. | |
doc_13267 |
Returns the average of the array elements along given axis. Masked entries are ignored, and result elements which are not finite will be masked. Refer to numpy.mean for full documentation. See also numpy.ndarray.mean
corresponding function for ndarrays numpy.mean
Equivalent function numpy.ma.average
Weighted a... | |
doc_13268 | Resets the codec buffers used for keeping internal state. Calling this method should ensure that the data on the output is put into a clean state that allows appending of new fresh data without having to rescan the whole stream to recover state. | |
doc_13269 | Set the list of supplemental group ids associated with the current process to groups. groups must be a sequence, and each element must be an integer identifying a group. This operation is typically available only to the superuser. Availability: Unix. Note On Mac OS X, the length of groups may not exceed the system-def... | |
doc_13270 | Default widget: TextInput
Empty value: '' (an empty string) Normalizes to: the type returned by the compress method of the subclass. Validates the given value against each of the fields specified as an argument to the MultiValueField. Error message keys: required, invalid, incomplete
Aggregates the logic of multipl... | |
doc_13271 |
Calculate the expanding minimum. Parameters
*args
For NumPy compatibility and will not have an effect on the result.
engine:str, default None
'cython' : Runs the operation through C-extensions from cython. 'numba' : Runs the operation through JIT compiled code from numba.
None : Defaults to 'cython' or glob... | |
doc_13272 |
Local threshold of an image. The resulting binary mask is True if the gray value of the center pixel is greater than the local mean. Parameters
image([P,] M, N) ndarray (uint8, uint16)
Input image.
selemndarray
The neighborhood expressed as an ndarray of 1’s and 0’s.
out([P,] M, N) array (same dtype as in... | |
doc_13273 |
Convert a Timestamp object to a native Python datetime object. If warn=True, issue a warning if nanoseconds is nonzero. Examples
>>> ts = pd.Timestamp('2020-03-14T15:32:52.192548')
>>> ts.to_pydatetime()
datetime.datetime(2020, 3, 14, 15, 32, 52, 192548)
Analogous for pd.NaT:
>>> pd.NaT.to_pydatetime()
NaT | |
doc_13274 |
Synonym for DataFrame.fillna() with method='bfill'. Returns
Series/DataFrame or None
Object with missing values filled or None if inplace=True. | |
doc_13275 |
Applies the log(Softmax(x))\log(\text{Softmax}(x)) function to an n-dimensional input Tensor. The LogSoftmax formulation can be simplified as: LogSoftmax(xi)=log(exp(xi)∑jexp(xj))\text{LogSoftmax}(x_{i}) = \log\left(\frac{\exp(x_i) }{ \sum_j \exp(x_j)} \right)
Shape:
Input: (∗)(*) where * means, any numbe... | |
doc_13276 | Blackman window function. w[n]=0.42−0.5cos(2πnN−1)+0.08cos(4πnN−1)w[n] = 0.42 - 0.5 \cos \left( \frac{2 \pi n}{N - 1} \right) + 0.08 \cos \left( \frac{4 \pi n}{N - 1} \right)
where NN is the full window size. The input window_length is a positive integer controlling the returned window size. periodic flag determi... | |
doc_13277 | See Migration guide for more details. tf.compat.v1.raw_ops.DynamicStitch
tf.raw_ops.DynamicStitch(
indices, data, name=None
)
Builds a merged tensor such that merged[indices[m][i, ..., j], ...] = data[m][i, ..., j, ...]
For example, if each indices[m] is scalar or vector, we have # Scalar indices:
merged[indice... | |
doc_13278 | Returns an iterator over module parameters, yielding both the name of the parameter as well as the parameter itself. Parameters
prefix (str) – prefix to prepend to all parameter names.
recurse (bool) – if True, then yields parameters of this module and all submodules. Otherwise, yields only parameters that are dir... | |
doc_13279 | The version of the Unicode database used in this module. | |
doc_13280 | Returns a result tensor where each result[i]\texttt{result[i]} is independently sampled from Bernoulli(self[i])\text{Bernoulli}(\texttt{self[i]}) . self must have floating point dtype, and the result will have the same dtype. See torch.bernoulli() | |
doc_13281 | tf.distribute.experimental.partitioners.FixedShardsPartitioner(
num_shards
)
Examples:
# standalone usage:
partitioner = FixedShardsPartitioner(num_shards=2)
partitions = partitioner(tf.TensorShape([10, 3]), tf.float32)
[2, 1]
# use in ParameterServerStrategy
# strategy = tf.distribute.experimental.ParameterServ... | |
doc_13282 |
Set the CapStyle for the collection (for all its elements). Parameters
csCapStyle or {'butt', 'projecting', 'round'} | |
doc_13283 | See Migration guide for more details. tf.compat.v1.keras.wrappers.scikit_learn.KerasClassifier
tf.keras.wrappers.scikit_learn.KerasClassifier(
build_fn=None, **sk_params
)
Methods check_params View source
check_params(
params
)
Checks for user typos in params.
Arguments
params dictionary; the para... | |
doc_13284 | A subclass of OSError, this exception is raised when a timeout occurs on a socket which has had timeouts enabled via a prior call to settimeout() (or implicitly through setdefaulttimeout()). The accompanying value is a string whose value is currently always “timed out”. Changed in version 3.3: This class was made a su... | |
doc_13285 | alias of torch.distributions.constraints._GreaterThanEq | |
doc_13286 |
Alias for set_facecolor. | |
doc_13287 |
Flattens a contiguous range of dims into a tensor. For use with Sequential. Shape:
Input: (N,∗dims)(N, *dims)
Output: (N,∏∗dims)(N, \prod *dims) (for the default case). Parameters
start_dim – first dim to flatten (default = 1).
end_dim – last dim to flatten (default = -1). Examples::
>>> input = to... | |
doc_13288 |
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_13289 |
Call all of the registered callbacks. This function is triggered internally when a property is changed. See also add_callback
remove_callback | |
doc_13290 | Assert that iter is deallocated after iterating. | |
doc_13291 | Comment for the individual archive member as a bytes object. | |
doc_13292 |
Set whether the y-axis is autoscaled on the next draw or call to Axes.autoscale_view. Parameters
bbool | |
doc_13293 | scales the vector to a given length. scale_to_length(float) -> None Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length 0. If the vector is the zero vector (i.e. has length 0 thus no direction) a ValueError is raised. | |
doc_13294 | If flag is True, then syncup() is called automatically whenever there is a change in the window. | |
doc_13295 | An HTTP status code as defined in RFC 2616. This numeric value corresponds to a value found in the dictionary of codes as found in http.server.BaseHTTPRequestHandler.responses. | |
doc_13296 |
Generate coordinates of pixels within circle. Parameters
r, cdouble
Center coordinate of disk.
radiusdouble
Radius of disk.
shapetuple, optional
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for disks that exceed the image size. If None, the full e... | |
doc_13297 | Return an iterator over the instructions in the supplied function, method, source code string or code object. The iterator generates a series of Instruction named tuples giving the details of each operation in the supplied code. If first_line is not None, it indicates the line number that should be reported for the fir... | |
doc_13298 | See Migration guide for more details. tf.compat.v1.unique_with_counts
tf.unique_with_counts(
x, out_idx=tf.dtypes.int32, name=None
)
This operation returns a tensor y containing all of the unique elements of x sorted in the same order that they occur in x. This operation also returns a tensor idx the same size a... | |
doc_13299 | Define the URL of a dedicated HTTP server for the network tests. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.