doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
numpy.char.chararray.reshape method char.chararray.reshape(shape, order='C')
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 ele... | numpy.reference.generated.numpy.char.chararray.reshape |
numpy.char.chararray.resize method char.chararray.resize(new_shape, refcheck=True)
Change shape and size of array in-place. Parameters
new_shapetuple of ints, or n ints
Shape of resized array.
refcheckbool, optional
If False, reference count will not be checked. Default is True. Returns
None
Raises... | numpy.reference.generated.numpy.char.chararray.resize |
numpy.char.chararray.rfind method char.chararray.rfind(sub, start=0, end=None)[source]
For each element in self, return the highest index in the string where substring sub is found, such that sub is contained within [start, end]. See also char.rfind | numpy.reference.generated.numpy.char.chararray.rfind |
numpy.char.chararray.rindex method char.chararray.rindex(sub, start=0, end=None)[source]
Like rfind, but raises ValueError when the substring sub is not found. See also char.rindex | numpy.reference.generated.numpy.char.chararray.rindex |
numpy.char.chararray.rjust method char.chararray.rjust(width, fillchar=' ')[source]
Return an array with the elements of self right-justified in a string of length width. See also char.rjust | numpy.reference.generated.numpy.char.chararray.rjust |
numpy.char.chararray.rsplit method char.chararray.rsplit(sep=None, maxsplit=None)[source]
For each element in self, return a list of the words in the string, using sep as the delimiter string. See also char.rsplit | numpy.reference.generated.numpy.char.chararray.rsplit |
numpy.char.chararray.rstrip method char.chararray.rstrip(chars=None)[source]
For each element in self, return a copy with the trailing characters removed. See also char.rstrip | numpy.reference.generated.numpy.char.chararray.rstrip |
numpy.char.chararray.searchsorted method char.chararray.searchsorted(v, side='left', sorter=None)
Find indices where elements of v should be inserted in a to maintain order. For full documentation, see numpy.searchsorted See also numpy.searchsorted
equivalent function | numpy.reference.generated.numpy.char.chararray.searchsorted |
numpy.char.chararray.setfield method char.chararray.setfield(val, dtype, offset=0)
Put a value into a specified place in a field defined by a data-type. Place val into a’s field defined by dtype and beginning offset bytes into the field. Parameters
valobject
Value to be placed in field.
dtypedtype object
... | numpy.reference.generated.numpy.char.chararray.setfield |
numpy.char.chararray.setflags method char.chararray.setflags(write=None, align=None, uic=None)
Set array flags WRITEABLE, ALIGNED, (WRITEBACKIFCOPY and UPDATEIFCOPY), respectively. These Boolean-valued flags affect how numpy interprets the memory area used by a (see Notes below). The ALIGNED flag can only be set to... | numpy.reference.generated.numpy.char.chararray.setflags |
numpy.char.chararray.shape attribute char.chararray.shape
Tuple of array dimensions. The shape property is usually used to get the current shape of an array, but may also be used to reshape the array in-place by assigning a tuple of array dimensions to it. As with numpy.reshape, one of the new shape dimensions can ... | numpy.reference.generated.numpy.char.chararray.shape |
numpy.char.chararray.size attribute char.chararray.size
Number of elements in the array. Equal to np.prod(a.shape), i.e., the product of the array’s dimensions. Notes a.size returns a standard arbitrary precision Python integer. This may not be the case with other methods of obtaining the same value (like the sugge... | numpy.reference.generated.numpy.char.chararray.size |
numpy.char.chararray.sort method char.chararray.sort(axis=- 1, kind=None, order=None)
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’, ‘st... | numpy.reference.generated.numpy.char.chararray.sort |
numpy.char.chararray.split method char.chararray.split(sep=None, maxsplit=None)[source]
For each element in self, return a list of the words in the string, using sep as the delimiter string. See also char.split | numpy.reference.generated.numpy.char.chararray.split |
numpy.char.chararray.splitlines method char.chararray.splitlines(keepends=None)[source]
For each element in self, return a list of the lines in the element, breaking at line boundaries. See also char.splitlines | numpy.reference.generated.numpy.char.chararray.splitlines |
numpy.char.chararray.squeeze method char.chararray.squeeze(axis=None)
Remove axes of length one from a. Refer to numpy.squeeze for full documentation. See also numpy.squeeze
equivalent function | numpy.reference.generated.numpy.char.chararray.squeeze |
numpy.char.chararray.startswith method char.chararray.startswith(prefix, start=0, end=None)[source]
Returns a boolean array which is True where the string element in self starts with prefix, otherwise False. See also char.startswith | numpy.reference.generated.numpy.char.chararray.startswith |
numpy.char.chararray.strides attribute char.chararray.strides
Tuple of bytes to step in each dimension when traversing an array. The byte offset of element (i[0], i[1], ..., i[n]) in an array a is: offset = sum(np.array(i) * a.strides)
A more detailed explanation of strides can be found in the “ndarray.rst” file i... | numpy.reference.generated.numpy.char.chararray.strides |
numpy.char.chararray.strip method char.chararray.strip(chars=None)[source]
For each element in self, return a copy with the leading and trailing characters removed. See also char.strip | numpy.reference.generated.numpy.char.chararray.strip |
numpy.char.chararray.swapaxes method char.chararray.swapaxes(axis1, axis2)
Return a view of the array with axis1 and axis2 interchanged. Refer to numpy.swapaxes for full documentation. See also numpy.swapaxes
equivalent function | numpy.reference.generated.numpy.char.chararray.swapaxes |
numpy.char.chararray.swapcase method char.chararray.swapcase()[source]
For each element in self, return a copy of the string with uppercase characters converted to lowercase and vice versa. See also char.swapcase | numpy.reference.generated.numpy.char.chararray.swapcase |
numpy.char.chararray.T attribute char.chararray.T
The transposed array. Same as self.transpose(). See also transpose
Examples >>> x = np.array([[1.,2.],[3.,4.]])
>>> x
array([[ 1., 2.],
[ 3., 4.]])
>>> x.T
array([[ 1., 3.],
[ 2., 4.]])
>>> x = np.array([1.,2.,3.,4.])
>>> x
array([ 1., 2., 3.... | numpy.reference.generated.numpy.char.chararray.t |
numpy.char.chararray.take method char.chararray.take(indices, axis=None, out=None, mode='raise')
Return an array formed from the elements of a at the given indices. Refer to numpy.take for full documentation. See also numpy.take
equivalent function | numpy.reference.generated.numpy.char.chararray.take |
numpy.char.chararray.title method char.chararray.title()[source]
For each element in self, return a titlecased version of the string: words start with uppercase characters, all remaining cased characters are lowercase. See also char.title | numpy.reference.generated.numpy.char.chararray.title |
numpy.char.chararray.tobytes method char.chararray.tobytes(order='C')
Construct Python bytes containing the raw data bytes in the array. Constructs Python bytes showing a copy of the raw contents of data memory. The bytes object is produced in C-order by default. This behavior is controlled by the order parameter. ... | numpy.reference.generated.numpy.char.chararray.tobytes |
numpy.char.chararray.tofile method char.chararray.tofile(fid, sep='', format='%s')
Write array to a file as text or binary (default). Data is always written in ‘C’ order, independent of the order of a. The data produced by this method can be recovered using the function fromfile(). Parameters
fidfile or str or ... | numpy.reference.generated.numpy.char.chararray.tofile |
numpy.char.chararray.tolist method char.chararray.tolist()
Return the array as an a.ndim-levels deep nested list of Python scalars. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible builtin Python type, via the item function. If a.ndim is 0, then since the... | numpy.reference.generated.numpy.char.chararray.tolist |
numpy.char.chararray.tostring method char.chararray.tostring(order='C')
A compatibility alias for tobytes, with exactly the same behavior. Despite its name, it returns bytes not strs. Deprecated since version 1.19.0. | numpy.reference.generated.numpy.char.chararray.tostring |
numpy.char.chararray.translate method char.chararray.translate(table, deletechars=None)[source]
For each element in self, return a copy of the string where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped through the given translation table. S... | numpy.reference.generated.numpy.char.chararray.translate |
numpy.char.chararray.transpose method char.chararray.transpose(*axes)
Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d(a).T achie... | numpy.reference.generated.numpy.char.chararray.transpose |
numpy.char.chararray.upper method char.chararray.upper()[source]
Return an array with the elements of self converted to uppercase. See also char.upper | numpy.reference.generated.numpy.char.chararray.upper |
numpy.char.chararray.view method char.chararray.view([dtype][, type])
New view of array with the same data. Note Passing None for dtype is different from omitting the parameter, since the former invokes dtype(None) which is an alias for dtype('float_'). Parameters
dtypedata-type or ndarray sub-class, optional... | numpy.reference.generated.numpy.char.chararray.view |
numpy.char.chararray.zfill method char.chararray.zfill(width)[source]
Return the numeric string left-filled with zeros in a string of length width. See also char.zfill | numpy.reference.generated.numpy.char.chararray.zfill |
numpy.char.compare_chararrays char.compare_chararrays(a1, a2, cmp, rstrip)
Performs element-wise comparison of two string arrays using the comparison operator specified by cmp_op. Parameters
a1, a2array_like
Arrays to be compared.
cmp{“<”, “<=”, “==”, “>=”, “>”, “!=”}
Type of comparison.
rstripBoolean
... | numpy.reference.generated.numpy.char.compare_chararrays |
numpy.char.count char.count(a, sub, start=0, end=None)[source]
Returns an array with the number of non-overlapping occurrences of substring sub in the range [start, end]. Calls str.count element-wise. Parameters
aarray_like of str or unicode
substr or unicode
The substring to search for.
start, endint, op... | numpy.reference.generated.numpy.char.count |
numpy.char.decode char.decode(a, encoding=None, errors=None)[source]
Calls str.decode element-wise. The set of available codecs comes from the Python standard library, and may be extended at runtime. For more information, see the codecs module. Parameters
aarray_like of str or unicode
encodingstr, optional
... | numpy.reference.generated.numpy.char.decode |
numpy.char.encode char.encode(a, encoding=None, errors=None)[source]
Calls str.encode element-wise. The set of available codecs comes from the Python standard library, and may be extended at runtime. For more information, see the codecs module. Parameters
aarray_like of str or unicode
encodingstr, optional
... | numpy.reference.generated.numpy.char.encode |
numpy.char.endswith char.endswith(a, suffix, start=0, end=None)[source]
Returns a boolean array which is True where the string element in a ends with suffix, otherwise False. Calls str.endswith element-wise. Parameters
aarray_like of str or unicode
suffixstr
start, endint, optional
With optional start, te... | numpy.reference.generated.numpy.char.endswith |
numpy.char.equal char.equal(x1, x2)[source]
Return (x1 == x2) element-wise. Unlike numpy.equal, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters
x1, x2array_like of str or unicode
In... | numpy.reference.generated.numpy.char.equal |
numpy.char.expandtabs char.expandtabs(a, tabsize=8)[source]
Return a copy of each string element where all tab characters are replaced by one or more spaces. Calls str.expandtabs element-wise. Return a copy of each string element where all tab characters are replaced by one or more spaces, depending on the current ... | numpy.reference.generated.numpy.char.expandtabs |
numpy.char.find char.find(a, sub, start=0, end=None)[source]
For each element, return the lowest index in the string where substring sub is found. Calls str.find element-wise. For each element, return the lowest index in the string where substring sub is found, such that sub is contained in the range [start, end]. ... | numpy.reference.generated.numpy.char.find |
numpy.char.greater char.greater(x1, x2)[source]
Return (x1 > x2) element-wise. Unlike numpy.greater, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters
x1, x2array_like of str or unicode... | numpy.reference.generated.numpy.char.greater |
numpy.char.greater_equal char.greater_equal(x1, x2)[source]
Return (x1 >= x2) element-wise. Unlike numpy.greater_equal, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters
x1, x2array_lik... | numpy.reference.generated.numpy.char.greater_equal |
numpy.char.index char.index(a, sub, start=0, end=None)[source]
Like find, but raises ValueError when the substring is not found. Calls str.index element-wise. Parameters
aarray_like of str or unicode
substr or unicode
start, endint, optional
Returns
outndarray
Output array of ints. Returns -1 if sub... | numpy.reference.generated.numpy.char.index |
numpy.char.isalnum char.isalnum(a)[source]
Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise. Calls str.isalnum element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Returns ... | numpy.reference.generated.numpy.char.isalnum |
numpy.char.isalpha char.isalpha(a)[source]
Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise. Calls str.isalpha element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Returns
... | numpy.reference.generated.numpy.char.isalpha |
numpy.char.isdecimal char.isdecimal(a)[source]
For each element, return True if there are only decimal characters in the element. Calls unicode.isdecimal element-wise. Decimal characters include digit characters, and all characters that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO... | numpy.reference.generated.numpy.char.isdecimal |
numpy.char.isdigit char.isdigit(a)[source]
Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise. Calls str.isdigit element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Returns
out... | numpy.reference.generated.numpy.char.isdigit |
numpy.char.islower char.islower(a)[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. Calls str.islower element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
... | numpy.reference.generated.numpy.char.islower |
numpy.char.isnumeric char.isnumeric(a)[source]
For each element, return True if there are only numeric characters in the element. Calls unicode.isnumeric element-wise. Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155,
VULGAR FRACTION ONE FIFTH... | numpy.reference.generated.numpy.char.isnumeric |
numpy.char.isspace char.isspace(a)[source]
Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise. Calls str.isspace element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Ret... | numpy.reference.generated.numpy.char.isspace |
numpy.char.istitle char.istitle(a)[source]
Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise. Call str.istitle element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Returns
outndarra... | numpy.reference.generated.numpy.char.istitle |
numpy.char.isupper char.isupper(a)[source]
Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise. Call str.isupper element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like of str or unicode
Return... | numpy.reference.generated.numpy.char.isupper |
numpy.char.join char.join(sep, seq)[source]
Return a string which is the concatenation of the strings in the sequence seq. Calls str.join element-wise. Parameters
separray_like of str or unicode
seqarray_like of str or unicode
Returns
outndarray
Output array of str or unicode, depending on input types... | numpy.reference.generated.numpy.char.join |
numpy.char.less char.less(x1, x2)[source]
Return (x1 < x2) element-wise. Unlike numpy.greater, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters
x1, x2array_like of str or unicode
Inp... | numpy.reference.generated.numpy.char.less |
numpy.char.less_equal char.less_equal(x1, x2)[source]
Return (x1 <= x2) element-wise. Unlike numpy.less_equal, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters
x1, x2array_like of str ... | numpy.reference.generated.numpy.char.less_equal |
numpy.char.ljust char.ljust(a, width, fillchar=' ')[source]
Return an array with the elements of a left-justified in a string of length width. Calls str.ljust element-wise. Parameters
aarray_like of str or unicode
widthint
The length of the resulting strings
fillcharstr or unicode, optional
The characte... | numpy.reference.generated.numpy.char.ljust |
numpy.char.lower char.lower(a)[source]
Return an array with the elements converted to lowercase. Call str.lower element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like, {str, unicode}
Input array. Returns
outndarray, {str, unicode}
Output array of str or unicode, depen... | numpy.reference.generated.numpy.char.lower |
numpy.char.lstrip char.lstrip(a, chars=None)[source]
For each element in a, return a copy with the leading characters removed. Calls str.lstrip element-wise. Parameters
aarray-like, {str, unicode}
Input array.
chars{str, unicode}, optional
The chars argument is a string specifying the set of characters to... | numpy.reference.generated.numpy.char.lstrip |
numpy.char.mod char.mod(a, values)[source]
Return (a % i), that is pre-Python 2.6 string formatting (interpolation), element-wise for a pair of array_likes of str or unicode. Parameters
aarray_like of str or unicode
valuesarray_like of values
These values will be element-wise interpolated into the string. ... | numpy.reference.generated.numpy.char.mod |
numpy.char.multiply char.multiply(a, i)[source]
Return (a * i), that is string multiple concatenation, element-wise. Values in i of less than 0 are treated as 0 (which yields an empty string). Parameters
aarray_like of str or unicode
iarray_like of ints
Returns
outndarray
Output array of str or unicod... | numpy.reference.generated.numpy.char.multiply |
numpy.char.not_equal char.not_equal(x1, x2)[source]
Return (x1 != x2) element-wise. Unlike numpy.not_equal, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters
x1, x2array_like of str or ... | numpy.reference.generated.numpy.char.not_equal |
numpy.char.partition char.partition(a, sep)[source]
Partition each element in a around sep. Calls str.partition element-wise. For each element in a, split the element as the first occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and the part after the separator... | numpy.reference.generated.numpy.char.partition |
numpy.char.replace char.replace(a, old, new, count=None)[source]
For each element in a, return a copy of the string with all occurrences of substring old replaced by new. Calls str.replace element-wise. Parameters
aarray-like of str or unicode
old, newstr or unicode
countint, optional
If the optional argu... | numpy.reference.generated.numpy.char.replace |
numpy.char.rfind char.rfind(a, sub, start=0, end=None)[source]
For each element in a, return the highest index in the string where substring sub is found, such that sub is contained within [start, end]. Calls str.rfind element-wise. Parameters
aarray-like of str or unicode
substr or unicode
start, endint, o... | numpy.reference.generated.numpy.char.rfind |
numpy.char.rindex char.rindex(a, sub, start=0, end=None)[source]
Like rfind, but raises ValueError when the substring sub is not found. Calls str.rindex element-wise. Parameters
aarray-like of str or unicode
substr or unicode
start, endint, optional
Returns
outndarray
Output array of ints. See ... | numpy.reference.generated.numpy.char.rindex |
numpy.char.rjust char.rjust(a, width, fillchar=' ')[source]
Return an array with the elements of a right-justified in a string of length width. Calls str.rjust element-wise. Parameters
aarray_like of str or unicode
widthint
The length of the resulting strings
fillcharstr or unicode, optional
The charact... | numpy.reference.generated.numpy.char.rjust |
numpy.char.rpartition char.rpartition(a, sep)[source]
Partition (split) each element around the right-most separator. Calls str.rpartition element-wise. For each element in a, split the element as the last occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and th... | numpy.reference.generated.numpy.char.rpartition |
numpy.char.rsplit char.rsplit(a, sep=None, maxsplit=None)[source]
For each element in a, return a list of the words in the string, using sep as the delimiter string. Calls str.rsplit element-wise. Except for splitting from the right, rsplit behaves like split. Parameters
aarray_like of str or unicode
sepstr o... | numpy.reference.generated.numpy.char.rsplit |
numpy.char.rstrip char.rstrip(a, chars=None)[source]
For each element in a, return a copy with the trailing characters removed. Calls str.rstrip element-wise. Parameters
aarray-like of str or unicode
charsstr or unicode, optional
The chars argument is a string specifying the set of characters to be removed.... | numpy.reference.generated.numpy.char.rstrip |
numpy.char.split char.split(a, sep=None, maxsplit=None)[source]
For each element in a, return a list of the words in the string, using sep as the delimiter string. Calls str.split element-wise. Parameters
aarray_like of str or unicode
sepstr or unicode, optional
If sep is not specified or None, any whitespa... | numpy.reference.generated.numpy.char.split |
numpy.char.splitlines char.splitlines(a, keepends=None)[source]
For each element in a, return a list of the lines in the element, breaking at line boundaries. Calls str.splitlines element-wise. Parameters
aarray_like of str or unicode
keependsbool, optional
Line breaks are not included in the resulting list... | numpy.reference.generated.numpy.char.splitlines |
numpy.char.startswith char.startswith(a, prefix, start=0, end=None)[source]
Returns a boolean array which is True where the string element in a starts with prefix, otherwise False. Calls str.startswith element-wise. Parameters
aarray_like of str or unicode
prefixstr
start, endint, optional
With optional s... | numpy.reference.generated.numpy.char.startswith |
numpy.char.str_len char.str_len(a)[source]
Return len(a) element-wise. Parameters
aarray_like of str or unicode
Returns
outndarray
Output array of integers See also builtins.len | numpy.reference.generated.numpy.char.str_len |
numpy.char.strip char.strip(a, chars=None)[source]
For each element in a, return a copy with the leading and trailing characters removed. Calls str.strip element-wise. Parameters
aarray-like of str or unicode
charsstr or unicode, optional
The chars argument is a string specifying the set of characters to be... | numpy.reference.generated.numpy.char.strip |
numpy.char.swapcase char.swapcase(a)[source]
Return element-wise a copy of the string with uppercase characters converted to lowercase and vice versa. Calls str.swapcase element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like, {str, unicode}
Input array. Returns
outndarr... | numpy.reference.generated.numpy.char.swapcase |
numpy.char.title char.title(a)[source]
Return element-wise title cased version of string or unicode. Title case words start with uppercase characters, all remaining cased characters are lowercase. Calls str.title element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like, {str, uni... | numpy.reference.generated.numpy.char.title |
numpy.char.translate char.translate(a, table, deletechars=None)[source]
For each element in a, return a copy of the string where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped through the given translation table. Calls str.translate element-w... | numpy.reference.generated.numpy.char.translate |
numpy.char.upper char.upper(a)[source]
Return an array with the elements converted to uppercase. Calls str.upper element-wise. For 8-bit strings, this method is locale-dependent. Parameters
aarray_like, {str, unicode}
Input array. Returns
outndarray, {str, unicode}
Output array of str or unicode, depe... | numpy.reference.generated.numpy.char.upper |
numpy.char.zfill char.zfill(a, width)[source]
Return the numeric string left-filled with zeros Calls str.zfill element-wise. Parameters
aarray_like, {str, unicode}
Input array.
widthint
Width of string to left-fill elements in a. Returns
outndarray, {str, unicode}
Output array of str or unicode, d... | numpy.reference.generated.numpy.char.zfill |
numpy.chararray.argsort method 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.chararray.argsort |
numpy.chararray.astype method 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 order of the ... | numpy.reference.generated.numpy.chararray.astype |
numpy.chararray.base attribute 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.chararray.base |
numpy.chararray.copy method 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 closely as ... | numpy.reference.generated.numpy.chararray.copy |
numpy.chararray.count method 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.chararray.count |
numpy.chararray.ctypes attribute 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 strides attri... | numpy.reference.generated.numpy.chararray.ctypes |
numpy.chararray.data attribute chararray.data
Python buffer object pointing to the start of the array’s data. | numpy.reference.generated.numpy.chararray.data |
numpy.chararray.decode method chararray.decode(encoding=None, errors=None)[source]
Calls str.decode element-wise. See also char.decode | numpy.reference.generated.numpy.chararray.decode |
numpy.chararray.dump method 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.chararray.dump |
numpy.chararray.dumps method 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.chararray.dumps |
numpy.chararray.encode method chararray.encode(encoding=None, errors=None)[source]
Calls str.encode element-wise. See also char.encode | numpy.reference.generated.numpy.chararray.encode |
numpy.chararray.endswith method 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.chararray.endswith |
numpy.chararray.expandtabs method 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.chararray.expandtabs |
numpy.chararray.fill method 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.chararray.fill |
numpy.chararray.find method 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.chararray.find |
numpy.chararray.flags attribute 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. Only the ... | numpy.reference.generated.numpy.chararray.flags |
numpy.chararray.flat attribute 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.arange(1,... | numpy.reference.generated.numpy.chararray.flat |
numpy.chararray.flatten method 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 column-maj... | numpy.reference.generated.numpy.chararray.flatten |
numpy.chararray.getfield method 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 be such th... | numpy.reference.generated.numpy.chararray.getfield |
numpy.chararray.index method 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.chararray.index |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.