doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
get_paginate_by(queryset)
Returns the number of items to paginate by, or None for no pagination. By default this returns the value of paginate_by. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.get_paginate_by |
get_paginate_orphans()
An integer specifying the number of “overflow” objects the last page can contain. By default this returns the value of paginate_orphans. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.get_paginate_orphans |
get_paginator(queryset, per_page, orphans=0, allow_empty_first_page=True)
Returns an instance of the paginator to use for this view. By default, instantiates an instance of paginator_class. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.get_paginator |
get_queryset()
Get the list of items for this view. This must be an iterable and may be a queryset (in which queryset-specific behavior will be enabled). | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.get_queryset |
model
The model that this view will display data for. Specifying model
= Foo is effectively the same as specifying queryset =
Foo.objects.all(), where objects stands for Foo’s default manager. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.model |
ordering
A string or list of strings specifying the ordering to apply to the queryset. Valid values are the same as those for order_by(). | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.ordering |
page_kwarg
A string specifying the name to use for the page parameter. The view will expect this parameter to be available either as a query string parameter (via request.GET) or as a kwarg variable specified in the URLconf. Defaults to page. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.page_kwarg |
paginate_by
An integer specifying how many objects should be displayed per page. If this is given, the view will paginate objects with paginate_by objects per page. The view will expect either a page query string parameter (via request.GET) or a page variable specified in the URLconf. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.paginate_by |
paginate_orphans
An integer specifying the number of “overflow” objects the last page can contain. This extends the paginate_by limit on the last page by up to paginate_orphans, in order to keep the last page from having a very small number of objects. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.paginate_orphans |
paginate_queryset(queryset, page_size)
Returns a 4-tuple containing (paginator, page, object_list, is_paginated). Constructed by paginating queryset into pages of size page_size. If the request contains a page argument, either as a captured URL argument or as a GET argument, object_list will correspond to the objects... | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.paginate_queryset |
paginator_class
The paginator class to be used for pagination. By default, django.core.paginator.Paginator is used. If the custom paginator class doesn’t have the same constructor interface as django.core.paginator.Paginator, you will also need to provide an implementation for get_paginator(). | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.paginator_class |
queryset
A QuerySet that represents the objects. If provided, the value of queryset supersedes the value provided for model. Warning queryset is a class attribute with a mutable value so care must be taken when using it directly. Before using it, either call its all() method or retrieve it with get_queryset() which ... | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectMixin.queryset |
class django.views.generic.list.MultipleObjectTemplateResponseMixin
A mixin class that performs template-based response rendering for views that operate upon a list of object instances. Requires that the view it is mixed with provides self.object_list, the list of object instances that the view is operating on. self.... | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectTemplateResponseMixin |
get_template_names()
Returns a list of candidate template names. Returns the following list: the value of template_name on the view (if provided) <app_label>/<model_name><template_name_suffix>.html | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectTemplateResponseMixin.get_template_names |
template_name_suffix
The suffix to append to the auto-generated candidate template name. Default suffix is _list. | django.ref.class-based-views.mixins-multiple-object#django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix |
class JavaScriptCatalog
A view that produces a JavaScript code library with functions that mimic the gettext interface, plus an array of translation strings. Attributes
domain
Translation domain containing strings to add in the view output. Defaults to 'djangojs'.
packages
A list of application names among ... | django.topics.i18n.translation#django.views.i18n.JavaScriptCatalog |
domain
Translation domain containing strings to add in the view output. Defaults to 'djangojs'. | django.topics.i18n.translation#django.views.i18n.JavaScriptCatalog.domain |
packages
A list of application names among installed applications. Those apps should contain a locale directory. All those catalogs plus all catalogs found in LOCALE_PATHS (which are always included) are merged into one catalog. Defaults to None, which means that all available translations from all INSTALLED_APPS are... | django.topics.i18n.translation#django.views.i18n.JavaScriptCatalog.packages |
class JSONCatalog
In order to use another client-side library to handle translations, you may want to take advantage of the JSONCatalog view. It’s similar to JavaScriptCatalog but returns a JSON response. See the documentation for JavaScriptCatalog to learn about possible values and use of the domain and packages att... | django.topics.i18n.translation#django.views.i18n.JSONCatalog |
set_language(request) | django.topics.i18n.translation#django.views.i18n.set_language |
static.serve(request, path, document_root, show_indexes=False) | django.ref.views#django.views.static.serve |
Widgets A widget is Django’s representation of an HTML input element. The widget handles the rendering of the HTML, and the extraction of data from a GET/POST dictionary that corresponds to the widget. The HTML generated by the built-in widgets uses HTML5 syntax, targeting <!DOCTYPE html>. For example, it uses boolean ... | django.ref.forms.widgets |
Glossary (n,)
A parenthesized number followed by a comma denotes a tuple with one element. The trailing comma distinguishes a one-element tuple from a parenthesized n. -1
In a dimension entry, instructs NumPy to choose the length that will keep the total number of array elements the same. >>> np.arange(12).reshap... | numpy.glossary |
Using F2PY F2PY can be used either as a command line tool f2py or as a Python module numpy.f2py. While we try to provide the command line tool as part of the numpy setup, some platforms like Windows make it difficult to reliably put the executables on the PATH. We will refer to f2py in this document but you may have to... | numpy.f2py.usage |
Scalars Python defines only one type of a particular data class (there is only one integer type, one floating-point type, etc.). This can be convenient in applications that don’t need to be concerned with all the ways data can be represented in a computer. For scientific computing, however, more control is often needed... | numpy.reference.arrays.scalars |
Parallel Random Number Generation There are three strategies implemented that can be used to produce repeatable pseudo-random numbers across multiple processes (local or distributed). SeedSequence spawning SeedSequence implements an algorithm to process a user-provided seed, typically as an integer of some size, and t... | numpy.reference.random.parallel |
Broadcasting See also numpy.broadcast The term broadcasting describes how NumPy treats arrays with different shapes during arithmetic operations. Subject to certain constraints, the smaller array is “broadcast” across the larger array so that they have compatible shapes. Broadcasting provides a means of vectorizing a... | numpy.user.basics.broadcasting |
Polynomials Polynomials in NumPy can be created, manipulated, and even fitted using the convenience classes of the numpy.polynomial package, introduced in NumPy 1.4. Prior to NumPy 1.4, numpy.poly1d was the class of choice and it is still available in order to maintain backward compatibility. However, the newer polynom... | numpy.reference.routines.polynomials |
Chebyshev Series (numpy.polynomial.chebyshev) This module provides a number of objects (mostly functions) useful for dealing with Chebyshev series, including a Chebyshev class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the ... | numpy.reference.routines.polynomials.chebyshev |
add_data_dir(data_path)[source]
Recursively add files under data_path to data_files list. Recursively add files under data_path to the list of data_files to be installed (and distributed). The data_path can be either a relative path-name, or an absolute path-name, or a 2-tuple where the first argument shows where in ... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_data_dir |
add_data_files(*files)[source]
Add data files to configuration data_files. Parameters
filessequence
Argument(s) can be either 2-sequence (<datadir prefix>,<path to data file(s)>) paths to data files where python datadir prefix defaults to package dir. Notes The form of each element of the files sequence i... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_data_files |
add_extension(name, sources, **kw)[source]
Add extension to configuration. Create and add an Extension instance to the ext_modules list. This method also takes the following optional keyword arguments that are passed on to the Extension constructor. Parameters
namestr
name of the extension
sourcesseq
list o... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_extension |
add_headers(*files)[source]
Add installable headers to configuration. Add the given sequence of files to the beginning of the headers list. By default, headers will be installed under <python- include>/<self.name.replace(‘.’,’/’)>/ directory. If an item of files is a tuple, then its first argument specifies the actua... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_headers |
add_include_dirs(*paths)[source]
Add paths to configuration include directories. Add the given sequence of paths to the beginning of the include_dirs list. This list will be visible to all extension modules of the current package. | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_include_dirs |
add_installed_library(name, sources, install_dir, build_info=None)[source]
Similar to add_library, but the specified library is installed. Most C libraries used with distutils are only used to build python extensions, but libraries built through this method will be installed so that they can be reused by third-party ... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_installed_library |
add_library(name, sources, **build_info)[source]
Add library to configuration. Parameters
namestr
Name of the extension.
sourcessequence
List of the sources. The list of sources may contain functions (called source generators) which must take an extension instance and a build directory as inputs and return ... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_library |
add_npy_pkg_config(template, install_dir, subst_dict=None)[source]
Generate and install a npy-pkg config file from a template. The config file generated from template is installed in the given install directory, using subst_dict for variable substitution. Parameters
templatestr
The path of the template, relativ... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_npy_pkg_config |
add_scripts(*files)[source]
Add scripts to configuration. Add the sequence of files to the beginning of the scripts list. Scripts will be installed under the <prefix>/bin/ directory. | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_scripts |
add_subpackage(subpackage_name, subpackage_path=None, standalone=False)[source]
Add a sub-package to the current Configuration instance. This is useful in a setup.py script for adding sub-packages to a package. Parameters
subpackage_namestr
name of the subpackage
subpackage_pathstr
if given, the subpackage ... | numpy.reference.distutils#numpy.distutils.misc_util.Configuration.add_subpackage |
numpy.broadcast.index attribute broadcast.index
current index in broadcasted result Examples >>> x = np.array([[1], [2], [3]])
>>> y = np.array([4, 5, 6])
>>> b = np.broadcast(x, y)
>>> b.index
0
>>> next(b), next(b), next(b)
((1, 4), (1, 5), (1, 6))
>>> b.index
3 | numpy.reference.generated.numpy.broadcast.index |
numpy.broadcast.iters attribute broadcast.iters
tuple of iterators along self’s “components.” Returns a tuple of numpy.flatiter objects, one for each “component” of self. See also numpy.flatiter
Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> row, col = b.it... | numpy.reference.generated.numpy.broadcast.iters |
numpy.broadcast.nd attribute broadcast.nd
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 | numpy.reference.generated.numpy.broadcast.nd |
numpy.broadcast.ndim attribute broadcast.ndim
Number of dimensions of broadcasted result. Alias for nd. New in version 1.12.0. Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.ndim
2 | numpy.reference.generated.numpy.broadcast.ndim |
numpy.broadcast.numiter attribute broadcast.numiter
Number of iterators possessed by the broadcasted result. Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.numiter
2 | numpy.reference.generated.numpy.broadcast.numiter |
numpy.broadcast.reset method broadcast.reset()
Reset the broadcasted result’s iterator(s). Parameters
None
Returns
None
Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.index
0
>>> next(b), next(b), next(b)
((1, 4), (2, 4), (3, 4))
>>> b.index
3
>>> b... | numpy.reference.generated.numpy.broadcast.reset |
numpy.broadcast.size attribute broadcast.size
Total size of broadcasted result. Examples >>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.size
9 | numpy.reference.generated.numpy.broadcast.size |
Using via numpy.distutils numpy.distutils is part of NumPy, and extends the standard Python distutils module to deal with Fortran sources and F2PY signature files, e.g. compile Fortran sources, call F2PY to construct extension modules, etc. Example Consider the following setup_file.py for the fib and scalar examples f... | numpy.f2py.buildtools.distutils |
numpy.busdaycalendar.holidays attribute busdaycalendar.holidays
A copy of the holiday array indicating additional invalid days. | numpy.reference.generated.numpy.busdaycalendar.holidays |
numpy.busdaycalendar.weekmask attribute busdaycalendar.weekmask
A copy of the seven-element boolean mask indicating valid days. | numpy.reference.generated.numpy.busdaycalendar.weekmask |
Byte-swapping Introduction to byte ordering and ndarrays The ndarray is an object that provide a python array interface to data in memory. It often happens that the memory that you want to view with an array is not of the same byte ordering as the computer on which you are running Python. For example, I might be worki... | numpy.user.basics.byteswapping |
numpy.char.add char.add(x1, x2)[source]
Return element-wise string concatenation for two arrays of str or unicode. Arrays x1 and x2 must have the same shape. Parameters
x1array_like of str or unicode
Input array.
x2array_like of str or unicode
Input array. Returns
addndarray
Output array of string... | numpy.reference.generated.numpy.char.add |
numpy.char.array char.array(obj, itemsize=None, copy=True, unicode=None, order=None)[source]
Create a chararray. Note This class is provided for numarray backward-compatibility. New code (not concerned with numarray compatibility) should use arrays of type string_ or unicode_ and use the free functions in numpy.ch... | numpy.reference.generated.numpy.char.array |
numpy.char.asarray char.asarray(obj, itemsize=None, unicode=None, order=None)[source]
Convert the input to a chararray, copying the data only if necessary. Versus a regular NumPy array of type str or unicode, this class adds the following functionality: values automatically have whitespace removed from the end whe... | numpy.reference.generated.numpy.char.asarray |
numpy.char.capitalize char.capitalize(a)[source]
Return a copy of a with only the first character of each element capitalized. Calls str.capitalize element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Input array of strings to capitalize. Returns
out... | numpy.reference.generated.numpy.char.capitalize |
numpy.char.center char.center(a, width, fillchar=' ')[source]
Return a copy of a with its elements centered in a string of length width. Calls str.center element-wise. Parameters
aarray_like of str or unicode
widthint
The length of the resulting strings
fillcharstr or unicode, optional
The padding chara... | numpy.reference.generated.numpy.char.center |
numpy.char.chararray.argsort method char.chararray.argsort(axis=- 1, kind=None, order=None)[source]
Returns the indices that would sort this array. Refer to numpy.argsort for full documentation. See also numpy.argsort
equivalent function | numpy.reference.generated.numpy.char.chararray.argsort |
numpy.char.chararray.astype method char.chararray.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
Copy of the array, cast to a specified type. Parameters
dtypestr or dtype
Typecode or data-type to which the array is cast.
order{‘C’, ‘F’, ‘A’, ‘K’}, optional
Controls the memory layout ord... | numpy.reference.generated.numpy.char.chararray.astype |
numpy.char.chararray.base attribute char.chararray.base
Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4])
>>> x.base is None
True
Slicing creates a view, whose memory is shared with x: >>> y = x[2:]
>>> y.base is x
True | numpy.reference.generated.numpy.char.chararray.base |
numpy.char.chararray.copy method char.chararray.copy(order='C')
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 c... | numpy.reference.generated.numpy.char.chararray.copy |
numpy.char.chararray.count method char.chararray.count(sub, start=0, end=None)[source]
Returns an array with the number of non-overlapping occurrences of substring sub in the range [start, end]. See also char.count | numpy.reference.generated.numpy.char.chararray.count |
numpy.char.chararray.ctypes attribute char.chararray.ctypes
An object to simplify the interaction of the array with the ctypes module. This attribute creates an object that makes it easier to use arrays when calling shared libraries with the ctypes module. The returned object has, among others, data, shape, and str... | numpy.reference.generated.numpy.char.chararray.ctypes |
numpy.char.chararray.data attribute char.chararray.data
Python buffer object pointing to the start of the array’s data. | numpy.reference.generated.numpy.char.chararray.data |
numpy.char.chararray.decode method char.chararray.decode(encoding=None, errors=None)[source]
Calls str.decode element-wise. See also char.decode | numpy.reference.generated.numpy.char.chararray.decode |
numpy.char.chararray.dtype attribute char.chararray.dtype
Data-type of the array’s elements. Parameters
None
Returns
dnumpy dtype object
See also numpy.dtype
Examples >>> x
array([[0, 1],
[2, 3]])
>>> x.dtype
dtype('int32')
>>> type(x.dtype)
<type 'numpy.dtype'> | numpy.reference.generated.numpy.char.chararray.dtype |
numpy.char.chararray.dump method char.chararray.dump(file)
Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters
filestr or Path
A string naming the dump file. Changed in version 1.17.0: pathlib.Path objects are now accepted. | numpy.reference.generated.numpy.char.chararray.dump |
numpy.char.chararray.dumps method char.chararray.dumps()
Returns the pickle of the array as a string. pickle.loads will convert the string back to an array. Parameters
None | numpy.reference.generated.numpy.char.chararray.dumps |
numpy.char.chararray.encode method char.chararray.encode(encoding=None, errors=None)[source]
Calls str.encode element-wise. See also char.encode | numpy.reference.generated.numpy.char.chararray.encode |
numpy.char.chararray.endswith method char.chararray.endswith(suffix, start=0, end=None)[source]
Returns a boolean array which is True where the string element in self ends with suffix, otherwise False. See also char.endswith | numpy.reference.generated.numpy.char.chararray.endswith |
numpy.char.chararray.expandtabs method char.chararray.expandtabs(tabsize=8)[source]
Return a copy of each string element where all tab characters are replaced by one or more spaces. See also char.expandtabs | numpy.reference.generated.numpy.char.chararray.expandtabs |
numpy.char.chararray.fill method char.chararray.fill(value)
Fill the array with a scalar value. Parameters
valuescalar
All elements of a will be assigned this value. Examples >>> a = np.array([1, 2])
>>> a.fill(0)
>>> a
array([0, 0])
>>> a = np.empty(2)
>>> a.fill(1)
>>> a
array([1., 1.]) | numpy.reference.generated.numpy.char.chararray.fill |
numpy.char.chararray.find method char.chararray.find(sub, start=0, end=None)[source]
For each element, return the lowest index in the string where substring sub is found. See also char.find | numpy.reference.generated.numpy.char.chararray.find |
numpy.char.chararray.flags attribute char.chararray.flags
Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access.... | numpy.reference.generated.numpy.char.chararray.flags |
numpy.char.chararray.flat attribute char.chararray.flat
A 1-D iterator over the array. This is a numpy.flatiter instance, which acts similarly to, but is not a subclass of, Python’s built-in iterator object. See also flatten
Return a copy of the array collapsed into one dimension. flatiter
Examples >>> x = np... | numpy.reference.generated.numpy.char.chararray.flat |
numpy.char.chararray.flatten method char.chararray.flatten(order='C')
Return a copy of the array collapsed into one dimension. Parameters
order{‘C’, ‘F’, ‘A’, ‘K’}, optional
‘C’ means to flatten in row-major (C-style) order. ‘F’ means to flatten in column-major (Fortran- style) order. ‘A’ means to flatten in ... | numpy.reference.generated.numpy.char.chararray.flatten |
numpy.char.chararray.getfield method char.chararray.getfield(dtype, offset=0)
Returns a field of the given array as a certain type. A field is a view of the array data with a given data-type. The values in the view are determined by the given type and the offset into the current array in bytes. The offset needs to ... | numpy.reference.generated.numpy.char.chararray.getfield |
numpy.char.chararray.imag attribute char.chararray.imag
The imaginary part of the array. Examples >>> x = np.sqrt([1+0j, 0+1j])
>>> x.imag
array([ 0. , 0.70710678])
>>> x.imag.dtype
dtype('float64') | numpy.reference.generated.numpy.char.chararray.imag |
numpy.char.chararray.index method char.chararray.index(sub, start=0, end=None)[source]
Like find, but raises ValueError when the substring is not found. See also char.index | numpy.reference.generated.numpy.char.chararray.index |
numpy.char.chararray.isalnum method char.chararray.isalnum()[source]
Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise. See also char.isalnum | numpy.reference.generated.numpy.char.chararray.isalnum |
numpy.char.chararray.isalpha method char.chararray.isalpha()[source]
Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise. See also char.isalpha | numpy.reference.generated.numpy.char.chararray.isalpha |
numpy.char.chararray.isdecimal method char.chararray.isdecimal()[source]
For each element in self, return True if there are only decimal characters in the element. See also char.isdecimal | numpy.reference.generated.numpy.char.chararray.isdecimal |
numpy.char.chararray.isdigit method char.chararray.isdigit()[source]
Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise. See also char.isdigit | numpy.reference.generated.numpy.char.chararray.isdigit |
numpy.char.chararray.islower method char.chararray.islower()[source]
Returns true for each element if all cased characters in the string are lowercase and there is at least one cased character, false otherwise. See also char.islower | numpy.reference.generated.numpy.char.chararray.islower |
numpy.char.chararray.isnumeric method char.chararray.isnumeric()[source]
For each element in self, return True if there are only numeric characters in the element. See also char.isnumeric | numpy.reference.generated.numpy.char.chararray.isnumeric |
numpy.char.chararray.isspace method char.chararray.isspace()[source]
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 | numpy.reference.generated.numpy.char.chararray.isspace |
numpy.char.chararray.istitle method char.chararray.istitle()[source]
Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise. See also char.istitle | numpy.reference.generated.numpy.char.chararray.istitle |
numpy.char.chararray.isupper method char.chararray.isupper()[source]
Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise. See also char.isupper | numpy.reference.generated.numpy.char.chararray.isupper |
numpy.char.chararray.item method char.chararray.item(*args)
Copy an element of an array to a standard Python scalar and return it. Parameters
*argsArguments (variable number and type)
none: in this case, the method only works for arrays with one element (a.size == 1), which element is copied into a standard ... | numpy.reference.generated.numpy.char.chararray.item |
numpy.char.chararray.itemsize attribute char.chararray.itemsize
Length of one array element in bytes. Examples >>> x = np.array([1,2,3], dtype=np.float64)
>>> x.itemsize
8
>>> x = np.array([1,2,3], dtype=np.complex128)
>>> x.itemsize
16 | numpy.reference.generated.numpy.char.chararray.itemsize |
numpy.char.chararray.join method char.chararray.join(seq)[source]
Return a string which is the concatenation of the strings in the sequence seq. See also char.join | numpy.reference.generated.numpy.char.chararray.join |
numpy.char.chararray.ljust method char.chararray.ljust(width, fillchar=' ')[source]
Return an array with the elements of self left-justified in a string of length width. See also char.ljust | numpy.reference.generated.numpy.char.chararray.ljust |
numpy.char.chararray.lower method char.chararray.lower()[source]
Return an array with the elements of self converted to lowercase. See also char.lower | numpy.reference.generated.numpy.char.chararray.lower |
numpy.char.chararray.lstrip method char.chararray.lstrip(chars=None)[source]
For each element in self, return a copy with the leading characters removed. See also char.lstrip | numpy.reference.generated.numpy.char.chararray.lstrip |
numpy.char.chararray.nbytes attribute char.chararray.nbytes
Total bytes consumed by the elements of the array. Notes Does not include memory consumed by non-element attributes of the array object. Examples >>> x = np.zeros((3,5,2), dtype=np.complex128)
>>> x.nbytes
480
>>> np.prod(x.shape) * x.itemsize
480 | numpy.reference.generated.numpy.char.chararray.nbytes |
numpy.char.chararray.ndim attribute char.chararray.ndim
Number of array dimensions. Examples >>> x = np.array([1, 2, 3])
>>> x.ndim
1
>>> y = np.zeros((2, 3, 4))
>>> y.ndim
3 | numpy.reference.generated.numpy.char.chararray.ndim |
numpy.char.chararray.nonzero method char.chararray.nonzero()
Return the indices of the elements that are non-zero. Refer to numpy.nonzero for full documentation. See also numpy.nonzero
equivalent function | numpy.reference.generated.numpy.char.chararray.nonzero |
numpy.char.chararray.put method char.chararray.put(indices, values, mode='raise')
Set a.flat[n] = values[n] for all n in indices. Refer to numpy.put for full documentation. See also numpy.put
equivalent function | numpy.reference.generated.numpy.char.chararray.put |
numpy.char.chararray.ravel method char.chararray.ravel([order])
Return a flattened array. Refer to numpy.ravel for full documentation. See also numpy.ravel
equivalent function ndarray.flat
a flat iterator on the array. | numpy.reference.generated.numpy.char.chararray.ravel |
numpy.char.chararray.real attribute char.chararray.real
The real part of the array. See also numpy.real
equivalent function Examples >>> x = np.sqrt([1+0j, 0+1j])
>>> x.real
array([ 1. , 0.70710678])
>>> x.real.dtype
dtype('float64') | numpy.reference.generated.numpy.char.chararray.real |
numpy.char.chararray.repeat method char.chararray.repeat(repeats, axis=None)
Repeat elements of an array. Refer to numpy.repeat for full documentation. See also numpy.repeat
equivalent function | numpy.reference.generated.numpy.char.chararray.repeat |
numpy.char.chararray.replace method char.chararray.replace(old, new, count=None)[source]
For each element in self, return a copy of the string with all occurrences of substring old replaced by new. See also char.replace | numpy.reference.generated.numpy.char.chararray.replace |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.