Skip to main content

numpy.npio

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