// Copyright (c) 2019 by the SciSharp Team
// Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Python.Runtime;
using Numpy.Models;
using Python.Included;
namespace Numpy
{
public static partial class np
{
public static partial class core {
public static partial class defchararray {
///
/// Return element-wise string concatenation for two arrays of str or unicode.
///
/// Arrays x1 and x2 must have the same shape.
///
///
/// Input array.
///
///
/// Input array.
///
///
/// Output array of string_ or unicode_, depending on input types
/// of the same shape as x1 and x2.
///
public static NDarray @add(string[] x1, string[] x2)
=> NumPy.Instance.core_defchararray_add(x1, x2);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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).
///
///
/// Output array of str or unicode, depending on input types
///
public static NDarray multiply(string[] a, int[] i)
=> NumPy.Instance.core_defchararray_multiply(a, i);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return (a % i), that is pre-Python 2.6 string formatting
/// (iterpolation), element-wise for a pair of array_likes of str
/// or unicode.
///
///
/// These values will be element-wise interpolated into the string.
///
///
/// Output array of str or unicode, depending on input types
///
public static NDarray mod(string[] a, NDarray values)
=> NumPy.Instance.core_defchararray_mod(a, values);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input array of strings to capitalize.
///
///
/// Output array of str or unicode, depending on input
/// types
///
public static NDarray capitalize(params string[] a)
=> NumPy.Instance.core_defchararray_capitalize(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return a copy of a with its elements centered in a string of
/// length width.
///
/// Calls str.center element-wise.
///
///
/// The length of the resulting strings
///
///
/// The padding character to use (default is space).
///
///
/// Output array of str or unicode, depending on input
/// types
///
public static NDarray center(string[] a, int width, string fillchar = " ")
=> NumPy.Instance.core_defchararray_center(a, width, fillchar:fillchar);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
/// Notes
///
/// The type of the result will depend on the encoding specified.
///
///
/// The name of an encoding
///
///
/// Specifies how to handle encoding errors
///
public static NDarray decode(string[] a, string encoding = null, string errors = null)
=> NumPy.Instance.core_defchararray_decode(a, encoding:encoding, errors:errors);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
/// Notes
///
/// The type of the result will depend on the encoding specified.
///
///
/// The name of an encoding
///
///
/// Specifies how to handle encoding errors
///
public static NDarray encode(string[] a, string encoding = null, string errors = null)
=> NumPy.Instance.core_defchararray_encode(a, encoding:encoding, errors:errors);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return a string which is the concatenation of the strings in the
/// sequence seq.
///
/// Calls str.join element-wise.
///
///
/// Output array of str or unicode, depending on input types
///
public static NDarray @join(string[] sep, string[] seq)
=> NumPy.Instance.core_defchararray_join(sep, seq);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return an array with the elements of a left-justified in a
/// string of length width.
///
/// Calls str.ljust element-wise.
///
///
/// The length of the resulting strings
///
///
/// The character to use for padding
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray ljust(string[] a, int width, string fillchar = " ")
=> NumPy.Instance.core_defchararray_ljust(a, width, fillchar:fillchar);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return an array with the elements converted to lowercase.
///
/// Call str.lower element-wise.
///
/// For 8-bit strings, this method is locale-dependent.
///
///
/// Input array.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray lower(NDarray a)
=> NumPy.Instance.core_defchararray_lower(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// For each element in a, return a copy with the leading characters
/// removed.
///
/// Calls str.lstrip element-wise.
///
///
/// Input array.
///
///
/// The chars argument is a string specifying the set of
/// characters to be removed.
/// If omitted or None, the chars
/// argument defaults to removing whitespace.
/// The chars argument
/// is not a prefix; rather, all combinations of its values are
/// stripped.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray lstrip(NDarray a, string chars = null)
=> NumPy.Instance.core_defchararray_lstrip(a, chars:chars);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
/// If the separator is not found, return 3 strings
/// containing the string itself, followed by two empty strings.
///
///
/// Input array
///
///
/// Separator to split each string element in a.
///
///
/// Output array of str or unicode, depending on input type.
///
/// The output array will have an extra dimension with 3
/// elements per input element.
///
public static NDarray partition(NDarray a, string sep)
=> NumPy.Instance.core_defchararray_partition(a, sep);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// If the optional argument count is given, only the first
/// count occurrences are replaced.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray replace(string[] a, string @new, string old, int? count = null)
=> NumPy.Instance.core_defchararray_replace(a, @new, old, count:count);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return an array with the elements of a right-justified in a
/// string of length width.
///
/// Calls str.rjust element-wise.
///
///
/// The length of the resulting strings
///
///
/// The character to use for padding
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray rjust(string[] a, int width, string fillchar = " ")
=> NumPy.Instance.core_defchararray_rjust(a, width, fillchar:fillchar);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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 the part after
/// the separator.
/// If the separator is not found, return 3 strings
/// containing the string itself, followed by two empty strings.
///
///
/// Input array
///
///
/// Right-most separator to split each element in array.
///
///
/// Output array of string or unicode, depending on input
/// type.
/// The output array will have an extra dimension with
/// 3 elements per input element.
///
public static NDarray rpartition(string[] a, string sep)
=> NumPy.Instance.core_defchararray_rpartition(a, sep);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// If sep is not specified or None, any whitespace string
/// is a separator.
///
///
/// If maxsplit is given, at most maxsplit splits are done,
/// the rightmost ones.
///
///
/// Array of list objects
///
public static NDarray rsplit(string[] a, string sep = null, int? maxsplit = null)
=> NumPy.Instance.core_defchararray_rsplit(a, sep:sep, maxsplit:maxsplit);
}
}
public static partial class core {
public static partial class defchararray {
///
/// For each element in a, return a copy with the trailing
/// characters removed.
///
/// Calls str.rstrip element-wise.
///
///
/// The chars argument is a string specifying the set of
/// characters to be removed.
/// If omitted or None, the chars
/// argument defaults to removing whitespace.
/// The chars argument
/// is not a suffix; rather, all combinations of its values are
/// stripped.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray rstrip(string[] a, string chars = null)
=> NumPy.Instance.core_defchararray_rstrip(a, chars:chars);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// If sep is not specified or None, any whitespace string is a
/// separator.
///
///
/// If maxsplit is given, at most maxsplit splits are done.
///
///
/// Array of list objects
///
public static NDarray split(string[] a, string sep = null, int? maxsplit = null)
=> NumPy.Instance.core_defchararray_split(a, sep:sep, maxsplit:maxsplit);
}
}
public static partial class core {
public static partial class defchararray {
///
/// For each element in a, return a list of the lines in the
/// element, breaking at line boundaries.
///
/// Calls str.splitlines element-wise.
///
///
/// Line breaks are not included in the resulting list unless
/// keepends is given and true.
///
///
/// Array of list objects
///
public static NDarray splitlines(string[] a, bool? keepends = null)
=> NumPy.Instance.core_defchararray_splitlines(a, keepends:keepends);
}
}
public static partial class core {
public static partial class defchararray {
///
/// For each element in a, return a copy with the leading and
/// trailing characters removed.
///
/// Calls str.strip element-wise.
///
///
/// The chars argument is a string specifying the set of
/// characters to be removed.
/// If omitted or None, the chars
/// argument defaults to removing whitespace.
/// The chars argument
/// is not a prefix or suffix; rather, all combinations of its
/// values are stripped.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray strip(string[] a, string chars = null)
=> NumPy.Instance.core_defchararray_strip(a, chars:chars);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input array.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray swapcase(NDarray a)
=> NumPy.Instance.core_defchararray_swapcase(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input array.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray title(NDarray a)
=> NumPy.Instance.core_defchararray_title(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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-wise.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray translate(string[] a, string table, string deletechars)
=> NumPy.Instance.core_defchararray_translate(a, table, deletechars);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return an array with the elements converted to uppercase.
///
/// Calls str.upper element-wise.
///
/// For 8-bit strings, this method is locale-dependent.
///
///
/// Input array.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray upper(NDarray a)
=> NumPy.Instance.core_defchararray_upper(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Return the numeric string left-filled with zeros
///
/// Calls str.zfill element-wise.
///
///
/// Input array.
///
///
/// Width of string to left-fill elements in a.
///
///
/// Output array of str or unicode, depending on input type
///
public static NDarray zfill(NDarray a, int width)
=> NumPy.Instance.core_defchararray_zfill(a, width);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input arrays of the same shape.
///
///
/// Input arrays of the same shape.
///
///
/// Output array of bools, or a single bool if x1 and x2 are scalars.
///
public static NDarray equal(string[] x2, string[] x1)
=> NumPy.Instance.core_defchararray_equal(x2, x1);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input arrays of the same shape.
///
///
/// Input arrays of the same shape.
///
///
/// Output array of bools, or a single bool if x1 and x2 are scalars.
///
public static NDarray not_equal(string[] x2, string[] x1)
=> NumPy.Instance.core_defchararray_not_equal(x2, x1);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input arrays of the same shape.
///
///
/// Input arrays of the same shape.
///
///
/// Output array of bools, or a single bool if x1 and x2 are scalars.
///
public static NDarray greater_equal(string[] x2, string[] x1)
=> NumPy.Instance.core_defchararray_greater_equal(x2, x1);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input arrays of the same shape.
///
///
/// Input arrays of the same shape.
///
///
/// Output array of bools, or a single bool if x1 and x2 are scalars.
///
public static NDarray less_equal(string[] x2, string[] x1)
=> NumPy.Instance.core_defchararray_less_equal(x2, x1);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input arrays of the same shape.
///
///
/// Input arrays of the same shape.
///
///
/// Output array of bools, or a single bool if x1 and x2 are scalars.
///
public static NDarray greater(string[] x2, string[] x1)
=> NumPy.Instance.core_defchararray_greater(x2, x1);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input arrays of the same shape.
///
///
/// Input arrays of the same shape.
///
///
/// Output array of bools, or a single bool if x1 and x2 are scalars.
///
public static NDarray less(string[] x2, string[] x1)
=> NumPy.Instance.core_defchararray_less(x2, x1);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Returns an array with the number of non-overlapping occurrences of
/// substring sub in the range [start, end].
///
/// Calls str.count element-wise.
///
///
/// The substring to search for.
///
///
/// Optional arguments start and end are interpreted as slice
/// notation to specify the range in which to count.
///
///
/// Optional arguments start and end are interpreted as slice
/// notation to specify the range in which to count.
///
///
/// Output array of ints.
///
public static NDarray count(string[] a, string sub, int? end = null, int? start = null)
=> NumPy.Instance.core_defchararray_count(a, sub, end:end, start:start);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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].
///
///
/// Optional arguments start and end are interpreted as in
/// slice notation.
///
///
/// Optional arguments start and end are interpreted as in
/// slice notation.
///
///
/// Output array of ints.
/// Returns -1 if sub is not found.
///
public static NDarray find(string[] a, string sub, int? end = null, int? start = null)
=> NumPy.Instance.core_defchararray_find(a, sub, end:end, start:start);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Like find, but raises ValueError when the substring is not found.
///
/// Calls str.index element-wise.
///
///
/// Output array of ints.
/// Returns -1 if sub is not found.
///
public static NDarray index(string[] a, string sub, int? end = null, int? start = null)
=> NumPy.Instance.core_defchararray_index(a, sub, end:end, start:start);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Output array of bools
///
public static NDarray isalpha(params string[] a)
=> NumPy.Instance.core_defchararray_isalpha(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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 that can be used to form decimal-radix numbers,
/// e.g.
/// U+0660, ARABIC-INDIC DIGIT ZERO.
///
///
/// Input array.
///
///
/// Array of booleans identical in shape to a.
///
public static NDarray isdecimal(NDarray a)
=> NumPy.Instance.core_defchararray_isdecimal(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Output array of bools
///
public static NDarray isdigit(params string[] a)
=> NumPy.Instance.core_defchararray_isdigit(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Output array of bools
///
public static NDarray islower(params string[] a)
=> NumPy.Instance.core_defchararray_islower(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Input array.
///
///
/// Array of booleans of same shape as a.
///
public static NDarray isnumeric(NDarray a)
=> NumPy.Instance.core_defchararray_isnumeric(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Output array of bools
///
public static NDarray isspace(params string[] a)
=> NumPy.Instance.core_defchararray_isspace(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Output array of bools
///
public static NDarray istitle(params string[] a)
=> NumPy.Instance.core_defchararray_istitle(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Output array of bools
///
public static NDarray isupper(params string[] a)
=> NumPy.Instance.core_defchararray_isupper(a);
}
}
public static partial class core {
public static partial class defchararray {
///
/// 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.
///
///
/// Optional arguments start and end are interpreted as in
/// slice notation.
///
///
/// Optional arguments start and end are interpreted as in
/// slice notation.
///
///
/// Output array of ints.
/// Return -1 on failure.
///
public static NDarray rfind(string[] a, string sub, int? end = null, int? start = null)
=> NumPy.Instance.core_defchararray_rfind(a, sub, end:end, start:start);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Like rfind, but raises ValueError when the substring sub is
/// not found.
///
/// Calls str.rindex element-wise.
///
///
/// Output array of ints.
///
public static NDarray rindex(string[] a, string sub, int? end = null, int? start = null)
=> NumPy.Instance.core_defchararray_rindex(a, sub, end:end, start:start);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Returns a boolean array which is True where the string element
/// in a starts with prefix, otherwise False.
///
/// Calls str.startswith element-wise.
///
///
/// With optional start, test beginning at that position.
/// With
/// optional end, stop comparing at that position.
///
///
/// With optional start, test beginning at that position.
/// With
/// optional end, stop comparing at that position.
///
///
/// Array of booleans
///
public static NDarray startswith(string[] a, string prefix, int? end = null, int? start = null)
=> NumPy.Instance.core_defchararray_startswith(a, prefix, end:end, start:start);
}
}
public static partial class core {
public static partial class defchararray {
///
/// Provides a convenient view on arrays of string and unicode values.
///
/// Versus a regular NumPy array of type str or unicode, this
/// class adds the following functionality:
///
/// chararrays should be created using numpy.char.array or
/// numpy.char.asarray, rather than this constructor directly.
///
/// This constructor creates the array, using buffer (with offset
/// and strides) if it is not None.
/// If buffer is None, then
/// constructs a new array with strides in “C order”, unless both
/// len(shape) >= 2 and order='Fortran', in which case strides
/// is in “Fortran order”.
///
///
/// Shape of the array.
///
///
/// Length of each array element, in number of characters.
/// Default is 1.
///
///
/// Are the array elements of type unicode (True) or string (False).
///
/// Default is False.
///
///
/// Memory address of the start of the array data.
/// Default is None,
/// in which case a new array is created.
///
///
/// Fixed stride displacement from the beginning of an axis?
/// Default is 0.
/// Needs to be >=0.
///
///
/// Strides for the array (see ndarray.strides for full description).
///
/// Default is None.
///
///
/// The order in which the array data is stored in memory: ‘C’ ->
/// “row major” order (the default), ‘F’ -> “column major”
/// (Fortran) order.
///
public static void chararray(Shape shape, int? itemsize = null, bool? unicode = null, int? buffer = null, int? offset = null, int[] strides = null, string order = null)
=> NumPy.Instance.core_defchararray_chararray(shape, itemsize:itemsize, unicode:unicode, buffer:buffer, offset:offset, strides:strides, order:order);
}
}
}
}