numpy.npio

Standard library module View source
function memmap
memmap(filename, dtype: type = u8, mode: str = "r+", offset: int = 0, shape = None, order: str = "C")
function parse_header
parse_header(header: str)
function load
load(file, mmap_mode: Optional[str] = None, ndim: Literal[int] = 1, dtype: type = float)
function save
save(file, arr)
function savetxt
savetxt(fname, X, delimiter: str = " ", newline: str = "\n", header: str = "", footer: str = "", comments: str = "# ")
function fromfile
fromfile(file, dtype: type = float, count: int = -1, sep: str = "", offset: int = 0)
function fromstring
fromstring(string, dtype: type = float, count: int = -1, sep: str = "")
class Converters
@tuple
class Converters[dtype, F, M, U]
Fields 7
funcs F
mask M
usecols U
dtype type
F type
M type
U type
Constructors 1
__new__
__new__(funcs, mask, usecols, dtype: type)
Special methods 1
__call__
__call__(self, field: str, idx: int)
function normalize_col
normalize_col(col: int, num_fields: int)
function default_fill
default_fill(dtype: type)
function malformed
malformed(row: int, num_fields: int)
function min_dim
min_dim(arr: ndarray, ndmin: Literal[int])
function make_conv
make_conv(converters, num_fields: int, usecols, dtype: type)
class CSVReader
class CSVReader
Constructors 1
__init__
__init__(self, path: str, delimiter: str = ",", quotechar: str = """, comments: str = "")
Methods 9
is_delimiter
is_delimiter(self, c)
is_comment
is_comment(self, c)
is_whitespace_delimiter
is_whitespace_delimiter(self)
skip_past_line
skip_past_line(self, i: int)
skip_delimiter
skip_delimiter(self, i: int)
skip_comments
skip_comments(self, i: int)
skip_lines
skip_lines(self, i: int, skip: int)
get_num_fields
get_num_fields(self, i0: int)
parse
parse(self, row_callback, num_fields: int, maxrows: int, i0: int)
Special methods 2
__enter__
__enter__(self)
__exit__
__exit__(self)
class ArrayUpdate
class ArrayUpdate[A, C, F]
Fields 7
arr A
cols C
conv F
last_row int
A type
C type
F type
Constructors 1
__init__
__init__(self, arr: A, cols: C, conv: F)
Properties 1
cap
@property
cap(self)
Methods 4
resize_arrays
resize_arrays(self, new_cap: int)
trim_arrays
trim_arrays(self)
convert
convert(self, field: str, idx: int, dtype: type)
convert_static
convert_static(self, field: str, idx: Literal[int], dtype: type)
Special methods 1
__call__
__call__(self, fields: Ptr[str], num_fields: int, row: int)
function loadtxt
loadtxt(fname: str, dtype: type = float, comments = "#", delimiter = None, converters = None, skiprows: int = 0, usecols = None, unpack: Literal[bool] = False, ndmin: Literal[int] = 0, max_rows: Optional[int] = None, quotechar: Optional[str] = None)
class CSVReaderGen
class CSVReaderGen
Constructors 1
__init__
__init__(self, path: str, delimiter: str = ",", comments: str = "")
Methods 21
fix_names
fix_names(self, excludelist: List[str], deletechars: str, replace_space: str, upper: bool, lower: bool)
is_delimiter
is_delimiter(self, c)
is_whitespace_delimiter
is_whitespace_delimiter(self)
is_comment
is_comment(self, c)
skip_lines
skip_lines(self, i: int, skip: int)
find_length
find_length(self, skip_footer: int)
skip_delimiter
skip_delimiter(self, i: int)
skip_delimiter(self, i: int, line: str)
skip_past_line
skip_past_line(self, i: int)
skip_comments_no_whitespace
skip_comments_no_whitespace(self, i: int)
skip_comments
skip_comments(self, i: int)
is_comment_or_blank_line
is_comment_or_blank_line(self, line: str)
get_num_fields
get_num_fields(self, i: int, get_names: bool)
partition_line
partition_line(self, line: str, delimiter, num_fields: int, row: int, invalid_raise: bool)
get_num_fields_spaced
get_num_fields_spaced(self, i: int, get_names: bool, delimiter)
get_num_fields_single
get_num_fields_single(self, line: str, get_names: bool)
get_num_fields_single_spaced
get_num_fields_single_spaced(self, line: str, get_names: bool, delimiter)
translate_cols
translate_cols(self, usecols, num_fields: int)
parse
parse(self, i: int, row_callback, num_fields: int, maxrows: int, invalid_raise: bool)
parse_spaced
parse_spaced(self, i: int, row_callback, num_fields: int, maxrows: int, invalid_raise: bool, delimiter)
parse_single
parse_single(self, line: str, row_callback, row: int, fields: Ptr[str], num_fields: int, invalid_raise: bool)
parse_single_spaced
parse_single_spaced(self, line: str, row_callback, row: int, fields: Ptr[str], num_fields: int, invalid_raise: bool, delimiter)
Special methods 2
__enter__
__enter__(self)
__exit__
__exit__(self)
class ArrayUpdateGen
class ArrayUpdateGen[A, C, F, M]
Fields 11
arr A
cols C
conv F
filling_values M
autostrip bool
loose bool
last_row int
A type
C type
F type
M type
Constructors 1
__init__
__init__(self, arr: A, cols: C, conv: F, filling_values: M, autostrip: bool, loose: bool)
Properties 1
cap
@property
cap(self)
Methods 6
resize_arrays
resize_arrays(self, new_cap: int)
trim_arrays
trim_arrays(self)
fill_value
fill_value(self, idx: int, dtype: type)
fill_value_static
fill_value_static(self, idx: Literal[int], dtype: type)
convert
convert(self, field: str, idx: int, dtype: type)
convert_static
convert_static(self, field: str, idx: Literal[int], dtype: type)
Special methods 1
__call__
__call__(self, fields: Ptr[str], num_fields: int, row: int)
function genfromtxt
genfromtxt(fname, dtype: type = float, comments: Optional[str] = "#", delimiter = None, skip_header: int = 0, skip_footer: int = 0, converters = None, filling_values = None, usecols = None, names = None, excludelist = None, deletechars: str = " !#$%&\'()*+, -./:;<=>?@[\\]^{|}~", replace_space: str = "_", autostrip: bool = False, case_sensitive = True, unpack: Literal[bool] = False, loose: bool = True, invalid_raise: bool = True, max_rows: Optional[int] = None, ndmin: Literal[int] = 0)