Base classes from O2scl

O2sclpy

Note that this python interface is not intended to provide the full functionality of the corresponding C++ class.

Class std_string

class o2sclpy.std_string(link, pointer=0)

Note that std_string objects are not “immutable” like Python strings.

__init__(link, pointer=0)

Init function for class std_string

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_string

__copy__()

Shallow copy function for class std_string

Returns: std_string object

__deepcopy__(memo)

Deep copy function for class std_string

Returns: new copy of the std_string object

__getitem__(n)
Parameters:
n: size_t
__setitem__(i, value)
Parameters:
i: size_t
value: char
init_bytes(s)

Initialize the string from a Python bytes object

Parameters:
s: a Python bytes string
length()
Returns: a Python int
resize(n)
Parameters:
n: size_t
to_bytes()

Copy the string to a Python bytes object

Returns: a Python bytes string

Class std_vector

class o2sclpy.std_vector(link, pointer=0)

Python interface for C++ class std::vector<double>.

__init__(link, pointer=0)

Init function for class std_vector

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_vector

__copy__()

Shallow copy function for class std_vector

Returns: std_vector object

__deepcopy__(memo)

Deep copy function for class std_vector

Returns: new copy of the std_vector object

__getitem__(n)
Parameters:
n: size_t
__setitem__(i, value)
Parameters:
i: size_t
value: double
erase(index)

Erase item at specified index

from_list(lst)

Set the vector with a python list

resize(n)
Parameters:
n: size_t
size()
Returns: a Python int
to_numpy()

Copy the vector to a numpy array

Returns: a one-dimensional numpy array

Class std_vector_int

class o2sclpy.std_vector_int(link, pointer=0)

Python interface for C++ class std::vector<int>.

__init__(link, pointer=0)

Init function for class std_vector_int

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_vector_int

__copy__()

Shallow copy function for class std_vector_int

Returns: std_vector_int object

__deepcopy__(memo)

Deep copy function for class std_vector_int

Returns: new copy of the std_vector_int object

__getitem__(n)
Parameters:
n: size_t
__setitem__(i, value)
Parameters:
i: size_t
value: int
resize(n)
Parameters:
n: size_t
size()
Returns: a Python int
to_numpy()

Copy the vector to a numpy array

Returns: a one-dimensional numpy array with dtype int32

Class std_vector_size_t

class o2sclpy.std_vector_size_t(link, pointer=0)

Python interface for C++ class std::vector<size_t>.

__init__(link, pointer=0)

Init function for class std_vector_size_t

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_vector_size_t

__copy__()

Shallow copy function for class std_vector_size_t

Returns: std_vector_size_t object

__deepcopy__(memo)

Deep copy function for class std_vector_size_t

Returns: new copy of the std_vector_size_t object

__getitem__(n)
Parameters:
n: size_t
__setitem__(i, value)
Parameters:
i: size_t
value: size_t
init_py(v)

Initialize the vector from a python array

resize(n)
Parameters:
n: size_t
size()
Returns: a Python int
to_numpy()

Copy the vector to a numpy array

Returns: a one-dimensional numpy array with dtype uint64

Class std_vector_string

class o2sclpy.std_vector_string(link, pointer=0)

Python interface for C++ class std::vector<std::string>.

__init__(link, pointer=0)

Init function for class std_vector_string

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_vector_string

__copy__()

Shallow copy function for class std_vector_string

Returns: std_vector_string object

__deepcopy__(memo)

Deep copy function for class std_vector_string

Returns: new copy of the std_vector_string object

__getitem__(n)
Parameters:
n: size_t
Returns: Python bytes object
__setitem__(i, value)
Parameters:
i: size_t
value: Python bytes object
resize(n)
Parameters:
n: size_t
set_list(ls)

Set the object from a python list

size()
Returns: a Python int
to_list()

Set the object from a python list

Class ublas_vector

class o2sclpy.ublas_vector(link, pointer=0)

Python interface for C++ class boost::numeric::ublas::vector<double>.

__init__(link, pointer=0)

Init function for class ublas_vector

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ublas_vector

__copy__()

Shallow copy function for class ublas_vector

Returns: ublas_vector object

__deepcopy__(memo)

Deep copy function for class ublas_vector

Returns: new copy of the ublas_vector object

__getitem__(i)
Parameters:
i: size_t
__setitem__(i, value)
Parameters:
i: size_t
value: double
resize(n)
Parameters:
n: size_t
size()
Returns: a Python int
to_numpy()

Copy the vector to a numpy array

Returns: a one-dimensional numpy array

Class ublas_vector_int

class o2sclpy.ublas_vector_int(link, pointer=0)

Python interface for C++ class boost::numeric::ublas::vector<int>.

__init__(link, pointer=0)

Init function for class ublas_vector_int

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ublas_vector_int

__copy__()

Shallow copy function for class ublas_vector_int

Returns: ublas_vector_int object

__deepcopy__(memo)

Deep copy function for class ublas_vector_int

Returns: new copy of the ublas_vector_int object

__getitem__(i)
Parameters:
i: size_t
__setitem__(i, value)
Parameters:
i: size_t
value: int
resize(n)
Parameters:
n: size_t
size()
Returns: a Python int
to_numpy()

Copy the vector to a numpy array

Returns: a one-dimensional numpy array

Class ublas_matrix

class o2sclpy.ublas_matrix(link, pointer=0)

Python interface for C++ class boost::numeric::ublas::matrix<double>.

__init__(link, pointer=0)

Init function for class ublas_matrix

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ublas_matrix

__copy__()

Shallow copy function for class ublas_matrix

Returns: ublas_matrix object

__deepcopy__(memo)

Deep copy function for class ublas_matrix

Returns: new copy of the ublas_matrix object

__getitem__(matrix_tuple)
Parameters:
m: size_t
n: size_t
__setitem__(matrix_tuple, value)
resize(m, n)
Parameters:
m: size_t
n: size_t
size1()
Returns: a Python int
size2()
Returns: a Python int
to_numpy()

Copy the vector to a numpy matrix

Returns: a two-dimensional numpy array, with dimension size1(),size2().

Class ublas_matrix_int

class o2sclpy.ublas_matrix_int(link, pointer=0)

Python interface for C++ class boost::numeric::ublas::matrix<int>.

__init__(link, pointer=0)

Init function for class ublas_matrix_int

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ublas_matrix_int

__copy__()

Shallow copy function for class ublas_matrix_int

Returns: ublas_matrix_int object

__deepcopy__(memo)

Deep copy function for class ublas_matrix_int

Returns: new copy of the ublas_matrix_int object

__getitem__(matrix_tuple)
Parameters:
m: size_t
n: size_t
__setitem__(matrix_tuple, value)
resize(m, n)
Parameters:
m: size_t
n: size_t
size1()
Returns: a Python int
size2()
Returns: a Python int
to_numpy()

Copy the ublas matrix to a numpy matrix

Returns: a two-dimensional numpy array, with dimension size1(),size2().

Class std_vector_vector

class o2sclpy.std_vector_vector(link, pointer=0)

Python interface for C++ class std::vector<std::vector<double>>.

__init__(link, pointer=0)

Init function for class std_vector_vector

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_vector_vector

__copy__()

Shallow copy function for class std_vector_vector

Returns: std_vector_vector object

__deepcopy__(memo)

Deep copy function for class std_vector_vector

Returns: new copy of the std_vector_vector object

__getitem__(n)
Parameters:
n: size_t
Returns: std_vector object
__setitem__(i, value)
Parameters:
i: size_t
value: Python array
resize(n)
Parameters:
n: size_t
size()
Returns: a Python int

Class vec_vec_string

class o2sclpy.vec_vec_string(link, pointer=0)

Python interface for C++ class std::vector<std::vector<std::string>>.

__init__(link, pointer=0)

Init function for class vec_vec_string

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class vec_vec_string

__copy__()

Shallow copy function for class vec_vec_string

Returns: vec_vec_string object

__deepcopy__(memo)

Deep copy function for class vec_vec_string

Returns: new copy of the vec_vec_string object

__getitem__(n)
Parameters:
n: size_t
Returns: std_vector_string object
__setitem__(i, value)
Parameters:
i: size_t
value: std_vector_string object
resize(n)
Parameters:
n: size_t
size()
Returns: a Python int

Class std_complex

class o2sclpy.std_complex(link, pointer=0)

Note that python complex numbers are immutable, but this class is not, so the real and imaginary parts can be changed with real_set() and imag_set().

__init__(link, pointer=0)

Init function for class std_complex

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class std_complex

__copy__()

Shallow copy function for class std_complex

Returns: std_complex object

imag()
Returns: a Python float
imag_set(value)
Parameters:
value: double
classmethod init(link, re, im)

Constructor-like class method for std::complex<double> .

Parameters:
real()
Returns: a Python float
real_set(value)
Parameters:
value: double
to_python()

Convert to a python complex number

Returns: a python complex number

Class lib_settings_class

class o2sclpy.lib_settings_class(link, pointer=0)

Python interface for O₂scl class lib_settings_class, see https://awsteiner.org/code/o2scl/html/class/lib_settings_class.html .

__init__(link, pointer=0)

Init function for class lib_settings_class

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class lib_settings_class

__copy__()

Shallow copy function for class lib_settings_class

Returns: lib_settings_class object

armadillo_support()
Returns: a Python boolean
config_h_report()
date_compiled()
Returns: Python bytes object
eigen_support()
Returns: a Python boolean
fftw_support()
Returns: a Python boolean
get_convert_units()
Returns: convert_units object
get_data_dir()
Returns: Python bytes object
get_doc_dir()
Returns: Python bytes object
hdf5_compression_support()
Returns: a Python boolean
ncurses_support()
Returns: a Python boolean
o2scl_version()
Returns: Python bytes object
openmp_support()
Returns: a Python boolean
range_check()
Returns: a Python boolean
readline_support()
Returns: a Python boolean
set_data_dir(dir)
Parameters:
dir: string
Returns: a Python int
set_doc_dir(dir)
Parameters:
dir: string
Returns: a Python int
system_type()
Returns: Python bytes object
time_compiled()
Returns: Python bytes object

Class table

class o2sclpy.table(link, pointer=0)

Python interface for O2scl class table, see https://awsteiner.org/code/o2scl/html/class/table.html .

__init__(link, pointer=0)

Init function for class table

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class table

__copy__()

Shallow copy function for class table

Returns: table object

__deepcopy__(memo)

Deep copy function for class table

Returns: new copy of the table object

__getitem__(col)
Parameters:
col: string
Returns: std_vector object
add_col_from_table(source, src_index, src_col, dest_index, dest_col)
Parameters:
source: table object
src_index: string
src_col: string
dest_index: string
dest_col: string
add_table(source)
Parameters:
source: table object
average_col_roll(col_name, window)
Parameters:
col_name: string
window: size_t
average_rows(window, rolling)
Parameters:
window: size_t
rolling: bool
clear()
clear_constants()
clear_data()
clear_table()
copy_column(src, dest)
Parameters:
src: string
dest: string
copy_row(src, dest)
Parameters:
src: size_t
dest: size_t
delete_column(col)
Parameters:
col: string
delete_row(scol, val)
Parameters:
scol: string
val: double
delete_rows_ends(row_start, row_end)
Parameters:
row_start: size_t
row_end: size_t
delete_rows_func(func)
Parameters:
func: string
deriv(sx, x0, sy)
Parameters:
sx: string
x0: double
sy: string
Returns: a Python float
deriv2(sx, x0, sy)
Parameters:
sx: string
x0: double
sy: string
Returns: a Python float
deriv2_col(x, y, yp)
Parameters:
x: string
y: string
yp: string
deriv2_index(ix, x0, iy)
Parameters:
ix: size_t
x0: double
iy: size_t
Returns: a Python float
deriv_col(x, y, yp)
Parameters:
x: string
y: string
yp: string
deriv_index(ix, x0, iy)
Parameters:
ix: size_t
x0: double
iy: size_t
Returns: a Python float
function_column(function, scol)
Parameters:
function: string
scol: string
function_find_row(function)
Parameters:
function: string
Returns: a Python int
functions_columns(list)
Parameters:
list: string
get(col, row)
Parameters:
col: string
row: size_t
Returns: a Python float
get_column_name(icol)
Parameters:
icol: size_t
Returns: Python bytes object
get_interp_type()
Returns: a Python int
get_maxlines()
Returns: a Python int
get_ncolumns()
Returns: a Python int
get_nlines()
Returns: a Python int
get_sorted_name(icol)
Parameters:
icol: size_t
Returns: Python bytes object
inc_maxlines(llines)
Parameters:
llines: size_t
init_column(scol, val)
Parameters:
scol: string
val: double
insert_row(nv, data, row)
Parameters:
nv: size_t
data: std_vector object
row: size_t
insert_table(source, src_index, allow_extrap, dest_index)
Parameters:
source: table object
src_index: string
allow_extrap: bool
dest_index: string
integ(sx, x1, x2, sy)
Parameters:
sx: string
x1: double
x2: double
sy: string
Returns: a Python float
integ_col(x, y, yi)
Parameters:
x: string
y: string
yi: string
integ_index(ix, x1, x2, iy)
Parameters:
ix: size_t
x1: double
x2: double
iy: size_t
Returns: a Python float
interp(sx, x0, sy)
Parameters:
sx: string
x0: double
sy: string
Returns: a Python float
interp_index(ix, x0, iy)
Parameters:
ix: size_t
x0: double
iy: size_t
Returns: a Python float
is_column(scol)
Parameters:
scol: string
Returns: a Python boolean
is_valid()
line_of_data(v)

Copy v to an std_vector object and add the line of data to the table

line_of_data_vector(data)
Parameters:
data: std_vector object
line_of_names(names)
Parameters:
names: string
lookup(scol, val)
Parameters:
scol: string
val: double
Returns: a Python int
lookup_column(scol)
Parameters:
scol: string
Returns: a Python int
lookup_val(scol, val, scol2)
Parameters:
scol: string
val: double
scol2: string
Returns: a Python int
max(max)
Parameters:
max: string
Returns: a Python float
min(min)
Parameters:
min: string
Returns: a Python float
new_column(col)
Parameters:
col: string
new_row(n)
Parameters:
n: size_t
ordered_lookup(scol, val)
Parameters:
scol: string
val: double
Returns: a Python int
rename_column(src, dest)
Parameters:
src: string
dest: string
row_function(scol, row)
Parameters:
scol: string
row: size_t
Returns: a Python float
row_to_dict(row)

Convert the specified row to a python dictionary

set(col, row, val)
Parameters:
col: string
row: size_t
val: double
set_interp_type(interp_type)
Parameters:
interp_type: size_t
set_maxlines(llines)
Parameters:
llines: size_t
set_nlines(lines)
Parameters:
lines: size_t
set_nlines_auto(il)
Parameters:
il: size_t
sort_column(scol)
Parameters:
scol: string
sort_table(scol)
Parameters:
scol: string
summary()
zero_table()

Class table_units

class o2sclpy.table_units(link, pointer=0)

Python interface for O2scl class table_units, see https://awsteiner.org/code/o2scl/html/class/table_units.html .

__init__(link, pointer=0)

Init function for class table_units

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class table_units

__copy__()

Shallow copy function for class table_units

Returns: table_units object

__deepcopy__(memo)

Deep copy function for class table_units

Returns: new copy of the table_units object

convert_to_unit(col, unit, err_on_fail=True)
Parameters:
col: string
unit: string
err_on_fail =True: bool
Returns: a Python int
get_unit(col)
Parameters:
col: string
Returns: Python bytes object
line_of_units(unit_line)
Parameters:
unit_line: string
remove_unit(col)
Parameters:
col: string
set_unit(col, unit)
Parameters:
col: string
unit: string

Class uniform_grid

class o2sclpy.uniform_grid(link, pointer=0)

Python interface for O2scl class uniform_grid, see https://awsteiner.org/code/o2scl/html/class/uniform_grid.html .

__init__(link, pointer=0)

Init function for class uniform_grid

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid

__copy__()

Shallow copy function for class uniform_grid

Returns: uniform_grid object

__getitem__(n)
Parameters:
n: size_t
get_end()
Returns: a Python float
get_nbins()
Returns: a Python int
get_npoints()
Returns: a Python int
get_start()
Returns: a Python float
get_width()
Returns: a Python float
is_log()
Returns: a Python boolean
to_numpy()

Copy the uniform_grid object to a numpy array

Returns: a one-dimensional numpy array

vector(v)
Parameters:
v: std_vector object

Class uniform_grid_end

class o2sclpy.uniform_grid_end(link, pointer=0)

Python interface for O2scl class uniform_grid_end, see https://awsteiner.org/code/o2scl/html/class/uniform_grid_end.html .

__init__(link, pointer=0)

Init function for class uniform_grid_end

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid_end

__copy__()

Shallow copy function for class uniform_grid_end

Returns: uniform_grid_end object

classmethod init(link, start, end, n_bins)

Constructor-like class method for uniform_grid_end<> .

Parameters:

Class uniform_grid_width

class o2sclpy.uniform_grid_width(link, pointer=0)

Python interface for O2scl class uniform_grid_width, see https://awsteiner.org/code/o2scl/html/class/uniform_grid_width.html .

__init__(link, pointer=0)

Init function for class uniform_grid_width

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid_width

__copy__()

Shallow copy function for class uniform_grid_width

Returns: uniform_grid_width object

classmethod init(link, start, width, n_bins)

Constructor-like class method for uniform_grid_width<> .

Parameters:

Class uniform_grid_end_width

class o2sclpy.uniform_grid_end_width(link, pointer=0)

Python interface for O2scl class uniform_grid_end_width, see https://awsteiner.org/code/o2scl/html/class/uniform_grid_end_width.html .

__init__(link, pointer=0)

Init function for class uniform_grid_end_width

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid_end_width

__copy__()

Shallow copy function for class uniform_grid_end_width

Returns: uniform_grid_end_width object

classmethod init(link, start, end, width)

Constructor-like class method for uniform_grid_end_width<> .

Parameters:

Class uniform_grid_log_end

class o2sclpy.uniform_grid_log_end(link, pointer=0)

Python interface for O2scl class uniform_grid_log_end, see https://awsteiner.org/code/o2scl/html/class/uniform_grid_log_end.html .

__init__(link, pointer=0)

Init function for class uniform_grid_log_end

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid_log_end

__copy__()

Shallow copy function for class uniform_grid_log_end

Returns: uniform_grid_log_end object

classmethod init(link, start, end, n_bins)

Constructor-like class method for uniform_grid_log_end<> .

Parameters:

Class uniform_grid_log_width

class o2sclpy.uniform_grid_log_width(link, pointer=0)

Python interface for O2scl class uniform_grid_log_width, see https://awsteiner.org/code/o2scl/html/class/uniform_grid_log_width.html .

__init__(link, pointer=0)

Init function for class uniform_grid_log_width

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid_log_width

__copy__()

Shallow copy function for class uniform_grid_log_width

Returns: uniform_grid_log_width object

classmethod init(link, start, width, n_bins)

Constructor-like class method for uniform_grid_log_width<> .

Parameters:

Class uniform_grid_log_end_width

class o2sclpy.uniform_grid_log_end_width(link, pointer=0)

Python interface for O2scl class uniform_grid_log_end_width, see https://awsteiner.org/code/o2scl/html/class/uniform_grid_log_end_width.html .

__init__(link, pointer=0)

Init function for class uniform_grid_log_end_width

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class uniform_grid_log_end_width

__copy__()

Shallow copy function for class uniform_grid_log_end_width

Returns: uniform_grid_log_end_width object

classmethod init(link, start, end, width)

Constructor-like class method for uniform_grid_log_end_width<> .

Parameters:

Class table3d

class o2sclpy.table3d(link, pointer=0)

Python interface for O₂scl class table3d, see https://awsteiner.org/code/o2scl/html/class/table3d.html .

__init__(link, pointer=0)

Init function for class table3d

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class table3d

__copy__()

Shallow copy function for class table3d

Returns: table3d object

__deepcopy__(memo)

Deep copy function for class table3d

Returns: new copy of the table3d object

clear()
copy_slice(name1, name2)
Parameters:
name1: string
name2: string
deriv_x(x, y, name)
Parameters:
x: double
y: double
name: string
Returns: a Python float
deriv_xy(x, y, name)
Parameters:
x: double
y: double
name: string
Returns: a Python float
deriv_y(x, y, name)
Parameters:
x: double
y: double
name: string
Returns: a Python float
function_matrix(function, mat, throw_on_err)
Parameters:
function: string
mat: ublas_matrix object
throw_on_err: bool
Returns: a Python int
function_slice(function, slice)
Parameters:
function: string
slice: string
get(ix, iy, name)
Parameters:
ix: size_t
iy: size_t
name: string
Returns: a Python float
get_grid_x(ix)
Parameters:
ix: size_t
Returns: a Python float
get_grid_y(iy)
Parameters:
iy: size_t
Returns: a Python float
get_i(ix, iy, iz)
Parameters:
ix: size_t
iy: size_t
iz: size_t
Returns: a Python float
get_nslices()
Returns: a Python int
get_nx()
Returns: a Python int
get_ny()
Returns: a Python int
get_size()
Parameters:
Returns: , a Python int, a Python int
get_slice(slice)
Parameters:
slice: string
Returns: ublas_matrix object
get_slice_i(slice)
Parameters:
slice: string
Returns: ublas_matrix object
get_slice_name(i)
Parameters:
i: size_t
Returns: Python bytes object
get_val(x, y, name)
Parameters:
x: double
y: double
name: string
Returns: a Python float
get_x_name()
Returns: Python bytes object
get_y_name()
Returns: Python bytes object
integ_x(x1, x2, y, name)
Parameters:
x1: double
x2: double
y: double
name: string
Returns: a Python float
integ_y(x, y1, y2, name)
Parameters:
x: double
y1: double
y2: double
name: string
Returns: a Python float
interp(x, y, name)
Parameters:
x: double
y: double
name: string
Returns: a Python float
is_size_set()
Returns: a Python boolean
is_slice(name)
Parameters:
name: string
Returns: a Python boolean, a Python int
is_xy_set()
Returns: a Python boolean
lookup_slice(name)
Parameters:
name: string
Returns: a Python int
lookup_x(val, ix)
Parameters:
val: double
ix: size_t
lookup_y(val, iy)
Parameters:
val: double
iy: size_t
new_slice(slice)
Parameters:
slice: string
rename_slice(name1, name2)
Parameters:
name1: string
name2: string
set(ix, iy, name, val)
Parameters:
ix: size_t
iy: size_t
name: string
val: double
set_grid_x(ix, val)
Parameters:
ix: size_t
val: double
set_grid_y(iy, val)
Parameters:
iy: size_t
val: double
set_i(ix, iy, iz, val)
Parameters:
ix: size_t
iy: size_t
iz: size_t
val: double
set_size(nx, ny)
Parameters:
nx: size_t
ny: size_t
set_slice_all(name, val)
Parameters:
name: string
val: double
set_val(x, y, name, val)
Parameters:
x: double
y: double
name: string
val: double
set_x_name(name)
Parameters:
name: string
set_xy(x_name, nx, x, y_name, ny, y)
Parameters:
x_name: string
nx: size_t
x: std_vector object
y_name: string
ny: size_t
y: std_vector object
set_xy_grid(x_name, x_grid, y_name, y_grid)
Parameters:
x_name: string
x_grid: uniform_grid object
y_name: string
y_grid: uniform_grid object
set_y_name(name)
Parameters:
name: string
summary()
zero_table()

Class index_spec

class o2sclpy.index_spec(link, pointer=0)

Python interface for O₂scl class index_spec, see https://awsteiner.org/code/o2scl/html/class/index_spec.html .

__init__(link, pointer=0)

Init function for class index_spec

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class index_spec

__copy__()

Shallow copy function for class index_spec

Returns: index_spec object

property ix1

Property of type ctypes.c_size_t

property ix2

Property of type ctypes.c_size_t

property ix3

Property of type ctypes.c_size_t

property type

Property of type ctypes.c_size_t

property val1

Property of type ctypes.c_double

property val2

Property of type ctypes.c_double

property val3

Property of type ctypes.c_double

Class ix_index

class o2sclpy.ix_index(link, pointer=0)

Python interface for O₂scl class ix_index, see https://awsteiner.org/code/o2scl/html/class/ix_index.html .

abstract __init__(link, pointer=0)

Init function for class ix_index

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_index

__copy__()

Shallow copy function for class ix_index

Returns: ix_index object

classmethod init(link, ix)

Constructor-like class method for ix_index .

Parameters:

Class ix_fixed

class o2sclpy.ix_fixed(link, pointer=0)

Python interface for O₂scl class ix_fixed, see https://awsteiner.org/code/o2scl/html/class/ix_fixed.html .

abstract __init__(link, pointer=0)

Init function for class ix_fixed

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_fixed

__copy__()

Shallow copy function for class ix_fixed

Returns: ix_fixed object

classmethod init(link, ix, ix2)

Constructor-like class method for ix_fixed .

Parameters:

Class ix_sum

class o2sclpy.ix_sum(link, pointer=0)

Python interface for O₂scl class ix_sum, see https://awsteiner.org/code/o2scl/html/class/ix_sum.html .

abstract __init__(link, pointer=0)

Init function for class ix_sum

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_sum

__copy__()

Shallow copy function for class ix_sum

Returns: ix_sum object

classmethod init(link, ix)

Constructor-like class method for ix_sum .

Parameters:

Class ix_trace

class o2sclpy.ix_trace(link, pointer=0)

Python interface for O₂scl class ix_trace, see https://awsteiner.org/code/o2scl/html/class/ix_trace.html .

abstract __init__(link, pointer=0)

Init function for class ix_trace

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_trace

__copy__()

Shallow copy function for class ix_trace

Returns: ix_trace object

classmethod init(link, ix, ix2)

Constructor-like class method for ix_trace .

Parameters:

Class ix_reverse

class o2sclpy.ix_reverse(link, pointer=0)

Python interface for O₂scl class ix_reverse, see https://awsteiner.org/code/o2scl/html/class/ix_reverse.html .

abstract __init__(link, pointer=0)

Init function for class ix_reverse

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_reverse

__copy__()

Shallow copy function for class ix_reverse

Returns: ix_reverse object

classmethod init(link, ix)

Constructor-like class method for ix_reverse .

Parameters:

Class ix_range

class o2sclpy.ix_range(link, pointer=0)

Python interface for O₂scl class ix_range, see https://awsteiner.org/code/o2scl/html/class/ix_range.html .

abstract __init__(link, pointer=0)

Init function for class ix_range

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_range

__copy__()

Shallow copy function for class ix_range

Returns: ix_range object

classmethod init(link, ix, start, end)

Constructor-like class method for ix_range .

Parameters:

Class ix_interp

class o2sclpy.ix_interp(link, pointer=0)

Python interface for O₂scl class ix_interp, see https://awsteiner.org/code/o2scl/html/class/ix_interp.html .

abstract __init__(link, pointer=0)

Init function for class ix_interp

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_interp

__copy__()

Shallow copy function for class ix_interp

Returns: ix_interp object

classmethod init(link, ix, v)

Constructor-like class method for ix_interp .

Parameters:

Class ix_grid

class o2sclpy.ix_grid(link, pointer=0)

Python interface for O₂scl class ix_grid, see https://awsteiner.org/code/o2scl/html/class/ix_grid.html .

abstract __init__(link, pointer=0)

Init function for class ix_grid

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_grid

__copy__()

Shallow copy function for class ix_grid

Returns: ix_grid object

classmethod init(link, ix, start, end, n_bins, log)

Constructor-like class method for ix_grid .

Parameters:

Class ix_gridw

class o2sclpy.ix_gridw(link, pointer=0)

Python interface for O₂scl class ix_gridw, see https://awsteiner.org/code/o2scl/html/class/ix_gridw.html .

abstract __init__(link, pointer=0)

Init function for class ix_gridw

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class ix_gridw

__copy__()

Shallow copy function for class ix_gridw

Returns: ix_gridw object

classmethod init(link, ix, start, end, width, log)

Constructor-like class method for ix_gridw .

Parameters:

Class tensor

class o2sclpy.tensor(link, pointer=0)

Python interface for O2scl class tensor, see https://awsteiner.org/code/o2scl/html/class/tensor.html .

__init__(link, pointer=0)

Init function for class tensor

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class tensor

__copy__()

Shallow copy function for class tensor

Returns: tensor object

__deepcopy__(memo)

Deep copy function for class tensor

Returns: new copy of the tensor object

clear()
copy_table3d(ix_x, ix_y, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
copy_table3d_sum(ix_x, ix_y, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
create_size(v)

Copy v to an std_vector_size_t object and add the line of data to the table

get(index)

Copy index to an std_vector_size_t object and get the data from the table

get_data()
Returns: numpy array
get_rank()
Returns: a Python int
get_size(i)
Parameters:
i: size_t
Returns: a Python int
get_size_arr()
Returns: std_vector_size_t object
get_vector(index)
Parameters:
index: vector object
Returns: a Python float
is_valid()
max(ix)
Parameters:
Returns: , a Python float
max_index(index)
Parameters:
index: std_vector_size_t object
max_value()
Returns: a Python float
min(ix)
Parameters:
Returns: , a Python float
min_index(index)
Parameters:
index: std_vector_size_t object
min_value()
Returns: a Python float
minmax(min_ix, max_ix)
Parameters:
min_ix: std_vector_size_t object
max_ix: std_vector_size_t object
Returns: , a Python float, a Python float
minmax_index(min, max)
Parameters:
min: std_vector_size_t object
max: std_vector_size_t object
minmax_value()
Parameters:
Returns: , a Python float, a Python float
pack_indices(index)
Parameters:
index: std_vector_size_t object
Returns: a Python int
resize(index)

Copy index to an std_vector_size_t object and resize

resize_vector(n, index)
Parameters:
n: size_t
index: vector object
set(index, val)

Copy index to an std_vector_size_t object and add the data to the table

set_all(x)
Parameters:
x: double
set_vector(index, val)
Parameters:
index: vector object
val: double
swap_data(data)
Parameters:
data: std_vector object
total_size()
Returns: a Python int
total_sum()
Returns: a Python float
unpack_index(ix, index)
Parameters:
ix: size_t
index: std_vector_size_t object

Class tensor_int

class o2sclpy.tensor_int(link, pointer=0)

Python interface for O2scl class tensor, see https://awsteiner.org/code/o2scl/html/class/tensor.html .

__init__(link, pointer=0)

Init function for class tensor_int

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class tensor_int

__copy__()

Shallow copy function for class tensor_int

Returns: tensor_int object

__deepcopy__(memo)

Deep copy function for class tensor_int

Returns: new copy of the tensor_int object

clear()
copy_table3d(ix_x, ix_y, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
copy_table3d_sum(ix_x, ix_y, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
create_size(v)

Copy v to an std_vector_size_t object and add the line of data to the table

get(index)

Copy index to an std_vector_size_t object and get the data from the table

get_data()
Returns: std_vector_int object
get_rank()
Returns: a Python int
get_size(i)
Parameters:
i: size_t
Returns: a Python int
get_vector(index)
Parameters:
index: vector object
Returns: a Python int
is_valid()
max(index)
Parameters:
index: std_vector_size_t object
Returns: , a Python int
max_index(index)
Parameters:
index: std_vector_size_t object
max_value()
Returns: a Python int
min(index)
Parameters:
index: std_vector_size_t object
Returns: , a Python int
min_index(index)
Parameters:
index: std_vector_size_t object
min_value()
Returns: a Python int
minmax(index_min, index_max)
Parameters:
index_min: std_vector_size_t object
index_max: std_vector_size_t object
Returns: , a Python int, a Python int
minmax_index(index_min, index_max)
Parameters:
index_min: std_vector_size_t object
index_max: std_vector_size_t object
minmax_value()
Parameters:
Returns: , a Python int, a Python int
pack_indices(index)
Parameters:
index: std_vector_size_t object
Returns: a Python int
resize(index)

Copy index to an std_vector_size_t object and resize

resize_vector(n, index)
Parameters:
n: size_t
index: vector object
set(index, val)

Copy index to an std_vector_size_t object and add the data to the table

set_all(x)
Parameters:
x: int
set_vector(index, val)
Parameters:
index: vector object
val: int
total_size()
Returns: a Python int
total_sum()
Returns: a Python int
unpack_index(ix, index)
Parameters:
ix: size_t
index: std_vector_size_t object

Class tensor_size_t

class o2sclpy.tensor_size_t(link, pointer=0)

Python interface for O2scl class tensor, see https://awsteiner.org/code/o2scl/html/class/tensor.html .

__init__(link, pointer=0)

Init function for class tensor_size_t

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class tensor_size_t

__copy__()

Shallow copy function for class tensor_size_t

Returns: tensor_size_t object

__deepcopy__(memo)

Deep copy function for class tensor_size_t

Returns: new copy of the tensor_size_t object

clear()
copy_table3d(ix_x, ix_y, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
copy_table3d_sum(ix_x, ix_y, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
create_size(v)

Copy v to an std_vector_size_t object and add the line of data to the table

get(index)

Copy index to an std_vector_size_t object and get the data from the table

get_data()
Returns: std_vector_size_t object
get_rank()
Returns: a Python int
get_size(i)
Parameters:
i: size_t
Returns: a Python int
get_vector(index)
Parameters:
index: vector object
Returns: a Python int
is_valid()
max(index)
Parameters:
index: std_vector_size_t object
Returns: , a Python int
max_index(index)
Parameters:
index: std_vector_size_t object
max_value()
Returns: a Python int
min(index)
Parameters:
index: std_vector_size_t object
Returns: , a Python int
min_index(index)
Parameters:
index: std_vector_size_t object
min_value()
Returns: a Python int
minmax(index_min, index_max)
Parameters:
index_min: std_vector_size_t object
index_max: std_vector_size_t object
Returns: , a Python int, a Python int
minmax_index(index_min, index_max)
Parameters:
index_min: std_vector_size_t object
index_max: std_vector_size_t object
minmax_value()
Parameters:
Returns: , a Python int, a Python int
resize(index)

Copy index to an std_vector_size_t object and resize

resize_vector(n, index)
Parameters:
n: size_t
index: vector object
set(index, val)

Copy index to an std_vector_size_t object and add the data to the table

set_all(x)
Parameters:
x: size_t
set_vector(index, val)
Parameters:
index: vector object
val: size_t
total_size()
Returns: a Python int
total_sum()
Returns: a Python int

Class tensor_grid

class o2sclpy.tensor_grid(link, pointer=0)

Python interface for O2scl class tensor_grid, see https://awsteiner.org/code/o2scl/html/class/tensor_grid.html .

__init__(link, pointer=0)

Init function for class tensor_grid

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class tensor_grid

__copy__()

Shallow copy function for class tensor_grid

Returns: tensor_grid object

__deepcopy__(memo)

Deep copy function for class tensor_grid

Returns: new copy of the tensor_grid object

clear()
copy_slice_interp(ifix, vals)
Parameters:
ifix: std_vector_size_t object
vals: std_vector object
Returns: tensor_grid object
copy_table3d_align(ix_x, ix_y, index, tab, z_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
index: vector object
tab: table3d object
z_name =”z”: string
copy_table3d_align_setxy(ix_x, ix_y, index, tab, x_name='x', y_name='y', z_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
index: vector object
tab: table3d object
x_name =”x”: string
y_name =”y”: string
z_name =”z”: string
copy_table3d_interp(ix_x, ix_y, index, tab, slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
index: std_vector_size_t object
tab: table3d object
slice_name =”z”: string
copy_table3d_interp_values(ix_x, ix_y, values, tab, slice_name='z', verbose=0)
Parameters:
ix_x: size_t
ix_y: size_t
values: std_vector object
tab: table3d object
slice_name =”z”: string
verbose =0: int
copy_table3d_interp_values_setxy(ix_x, ix_y, values, tab, x_name='x', y_name='y', slice_name='z')
Parameters:
ix_x: size_t
ix_y: size_t
values: std_vector object
tab: table3d object
x_name =”x”: string
y_name =”y”: string
slice_name =”z”: string
default_grid()
from_table3d_fermi(t3d, slice, n_points, low=0.0, high=0.0, width=0.0)
Parameters:
t3d: table3d object
slice: string
n_points: size_t
low =0.0: double
high =0.0: double
width =0.0: double
get_grid(i, j)
Parameters:
i: size_t
j: size_t
Returns: a Python float
get_grid_packed()
Returns: numpy array
get_val_vector(grid_point)
Parameters:
grid_point: vector object
Returns: a Python float
interp_linear(v)
Parameters:
v: vector object
Returns: a Python float
interp_linear_partial(ix_to_interp, ix, val)
Parameters:
ix_to_interp: std_vector_size_t object
val: std_vector object
Returns: a Python float
is_grid_set()
Returns: a Python boolean
is_valid()
lookup_grid(i, val)
Parameters:
i: size_t
val: double
Returns: a Python int
resize(index)

Copy index to an std_vector_size_t object and resize

resize_vector(rank, dim)
Parameters:
rank: size_t
dim: vector object
set_grid(i, j, val)
Parameters:
i: size_t
j: size_t
val: double
set_grid_i_func(ix, func)
Parameters:
ix: size_t
func: string
set_grid_i_vec(i, grid)
Parameters:
i: size_t
grid: vector object
set_grid_packed(grid)
Parameters:
grid: vector object
set_grid_vec_vec(grid_vecs)
Parameters:
grid_vecs: vector object
set_interp_type(interp_type)
Parameters:
interp_type: size_t
set_val_vector(grid_point, val)
Parameters:
grid_point: vector object
val: double

Class find_constants_const_entry

class o2sclpy.find_constants_const_entry(link, pointer=0)

Python interface for O₂scl class find_constants<>::const_entry, see https://awsteiner.org/code/o2scl/html/class/find_constants<>::const_entry.html .

__init__(link, pointer=0)

Init function for class find_constants_const_entry

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class find_constants_const_entry

__copy__()

Shallow copy function for class find_constants_const_entry

Returns: find_constants_const_entry object

property A

Property of type ctypes.c_int

property K

Property of type ctypes.c_int

property cd

Property of type ctypes.c_int

get_names()

Get object of type std::vector

get_source()

Get object of type std::string

get_unit()

Get object of type std::string

property k

Property of type ctypes.c_int

property m

Property of type ctypes.c_int

property mol

Property of type ctypes.c_int

property s

Property of type ctypes.c_int

set_names(value)

Set object of type std::vector

set_source(value)

Set object of type std::string

set_unit(value)

Set object of type std::string

property unit_flag

Property of type ctypes.c_int

property val

Property of type ctypes.c_double

Class find_constants

class o2sclpy.find_constants(link, pointer=0)

Python interface for O₂scl class find_constants<>, see https://awsteiner.org/code/o2scl/html/class/find_constants<>.html .

__init__(link, pointer=0)

Init function for class find_constants

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class find_constants

__copy__()

Shallow copy function for class find_constants

Returns: find_constants object

add_constant(f, verbose=0)
Parameters:
f: find_constants<>::const_entry object
verbose =0: int
del_constant(name, verbose=0)
Parameters:
name: std_string object
verbose =0: int
output_list_cout()

Class convert_units_der_unit

class o2sclpy.convert_units_der_unit(link, pointer=0)

Python interface for O₂scl class convert_units<>::der_unit, see https://awsteiner.org/code/o2scl/html/class/convert_units<>::der_unit.html .

__init__(link, pointer=0)

Init function for class convert_units_der_unit

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class convert_units_der_unit

__copy__()

Shallow copy function for class convert_units_der_unit

Returns: convert_units_der_unit object

property A

Property of type ctypes.c_int

property K

Property of type ctypes.c_int

property cd

Property of type ctypes.c_int

get_label()

Get object of type std::string

get_name()

Get object of type std::string

property k

Property of type ctypes.c_int

property m

Property of type ctypes.c_int

property mol

Property of type ctypes.c_int

property s

Property of type ctypes.c_int

set(label, val, name='', m=0, k=0, s=0, K=0, A=0, mol=0, cd=0)

Set the properties of a derived unit FIXME: better docs here

set_label(value)

Set object of type std::string

set_name(value)

Set object of type std::string

property val

Property of type ctypes.c_double

Class convert_units

class o2sclpy.convert_units(link, pointer=0)

Python interface for O2scl class convert_units, see https://awsteiner.org/code/o2scl/html/class/convert_units.html .

__init__(link, pointer=0)

Init function for class convert_units

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class convert_units

__copy__()

Shallow copy function for class convert_units

Returns: convert_units object

add_unit(label, val, name='', m=0, k=0, s=0, K=0, A=0, mol=0, cd=0)

Add a unit

add_unit_internal(d)
Parameters:
d: convert_units<>::der_unit object
clear_cache()
property combine_two_conv

Property of type ctypes.c_bool

convert(frm, to, val)
Parameters:
frm: string
to: string
val: double
Returns: a Python float
convert_ret(frm, to, val, converted)
Parameters:
frm: string
to: string
val: double
converted: double
Returns: a Python int
del_unit(name)
Parameters:
name: std_string object
property err_on_fail

Property of type ctypes.c_bool

find_print(name, unit, prec, use_regex)
Parameters:
name: string
unit: string
prec: size_t
use_regex: bool
find_unique(name, unit, use_regex=False)
Parameters:
name: string
unit: string
use_regex =false: bool
Returns: a Python float
is_in_cache(frm, to)
Parameters:
frm: string
to: string
Returns: a Python int
print_cache()
print_units_cout()
remove_cache(frm, to)
Parameters:
frm: string
to: string
Returns: a Python int
set_natural_units(c_is_one=True, hbar_is_one=True, kb_is_one=True)
Parameters:
c_is_one =true: bool
hbar_is_one =true: bool
kb_is_one =true: bool
test_unique()
property verbose

Property of type ctypes.c_int

Class columnify

class o2sclpy.columnify(link, pointer=0)

Python interface for O₂scl class columnify, see https://awsteiner.org/code/o2scl/html/class/columnify.html .

__init__(link, pointer=0)

Init function for class columnify

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class columnify

__copy__()

Shallow copy function for class columnify

Returns: columnify object

property align_dp

Property of type ctypes.c_int

property align_left

Property of type ctypes.c_int

property align_lmid

Property of type ctypes.c_int

property align_lnum

Property of type ctypes.c_int

property align_right

Property of type ctypes.c_int

property align_rmid

Property of type ctypes.c_int

Class format_float

class o2sclpy.format_float(link, pointer=0)

Python interface for O₂scl class format_float, see https://awsteiner.org/code/o2scl/html/class/format_float.html .

__init__(link, pointer=0)

Init function for class format_float

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class format_float

__copy__()

Shallow copy function for class format_float

Returns: format_float object

c_mode()
convert(x, debug=False)
Parameters:
x: double
debug =false: bool
Returns: Python bytes object
html_mode()
latex_mode()
set_dec_point(dec_point)
Parameters:
dec_point: string
set_exp_digits(d)
Parameters:
d: int
set_exp_limits(min, max)
Parameters:
min: int
max: int
set_pad_zeros(pad)
Parameters:
pad: bool
set_sig_figs(sig_figs)
Parameters:
sig_figs: size_t

Class interp_vec

class o2sclpy.interp_vec(link, pointer=0)

Python interface for O₂scl class interp_vec<std::vector<double>>, see https://awsteiner.org/code/o2scl/html/class/interp_vec<std::vector<double>>.html .

__init__(link, pointer=0)

Init function for class interp_vec

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class interp_vec

__copy__()

Shallow copy function for class interp_vec

Returns: interp_vec object

clear()
deriv(x0)
Parameters:
x0: double
Returns: a Python float
deriv2(x0)
Parameters:
x0: double
Returns: a Python float
eval(x0)
Parameters:
x0: double
Returns: a Python float
integ(x1, x2)
Parameters:
x1: double
x2: double
Returns: a Python float
set(n, x, y, interp_type)
Parameters:
n: size_t
x: std_vector object
y: std_vector object
interp_type: int

Class interp_krige_optim_rbf_noise

class o2sclpy.interp_krige_optim_rbf_noise(link, pointer=0)

Python interface for O₂scl class interp_krige_optim<std::vector<double>,std::vector<double>,covar_funct_rbf_noise>, see https://awsteiner.org/code/o2scl/html/class/interp_krige_optim<std::vector<double>,std::vector<double>,covar_funct_rbf_noise>.html .

__init__(link, pointer=0)

Init function for class interp_krige_optim_rbf_noise

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class interp_krige_optim_rbf_noise

__copy__()

Shallow copy function for class interp_krige_optim_rbf_noise

Returns: interp_krige_optim_rbf_noise object

deriv(x0)
Parameters:
x0: double
Returns: a Python float
deriv2(x0)
Parameters:
x0: double
Returns: a Python float
eval(x0)
Parameters:
x0: double
Returns: a Python float
property mode

Property of type ctypes.c_size_t

property mode_loo_cv

Property of type ctypes.c_size_t

property mode_loo_cv_bf

Property of type ctypes.c_size_t

property mode_max_lml

Property of type ctypes.c_size_t

sample(x0)
Parameters:
x0: double
Returns: a Python float
sample_vec(x, y)
Parameters:
x: std_vector object
y: std_vector object
set(size, x, y)
Parameters:
size: size_t
x: std_vector object
y: std_vector object
sigma(x0)
Parameters:
x0: double
Returns: a Python float
property verbose

Property of type ctypes.c_int

Class terminal

class o2sclpy.terminal(link, pointer=0)

Python interface for O₂scl class terminal, see https://awsteiner.org/code/o2scl/html/class/terminal.html .

__init__(link, pointer=0)

Init function for class terminal

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class terminal

__copy__()

Shallow copy function for class terminal

Returns: terminal object

alt_font()
Returns: Python bytes object
blue_bg()
Returns: Python bytes object
blue_fg()
Returns: Python bytes object
bold()
Returns: Python bytes object
cyan_bg()
Returns: Python bytes object
cyan_fg()
Returns: Python bytes object
default_fgbg()
Returns: Python bytes object
eight_bit_bg(col)
Parameters:
Returns: Python bytes object
eight_bit_fg(col)
Parameters:
Returns: Python bytes object
eight_bit_summ()
Returns: Python bytes object
green_bg()
Returns: Python bytes object
green_fg()
Returns: Python bytes object
hrule(n=78)
Parameters:
n =78: size_t
Returns: Python bytes object
is_redirected()
Returns: a Python boolean
lowint()
Returns: Python bytes object
magenta_bg()
Returns: Python bytes object
magenta_fg()
Returns: Python bytes object
normal_font()
Returns: Python bytes object
red_bg()
Returns: Python bytes object
red_fg()
Returns: Python bytes object
reverse()
Returns: Python bytes object
str_len(str)
Parameters:
str: string
Returns: a Python int
three_byte_summ()
Returns: Python bytes object
three_byte_summ_long()
Returns: Python bytes object
underline()
Returns: Python bytes object
yellow_bg()
Returns: Python bytes object
yellow_fg()
Returns: Python bytes object

Class gen_test_number

class o2sclpy.gen_test_number(link, pointer=0)

Python interface for O₂scl class gen_test_number<double>, see https://awsteiner.org/code/o2scl/html/class/gen_test_number<double>.html .

__init__(link, pointer=0)

Init function for class gen_test_number

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class gen_test_number

__copy__()

Shallow copy function for class gen_test_number

Returns: gen_test_number object

gen()
Returns: a Python float
reset()
set_radix(r)
Parameters:
r: double

Class funct_string

class o2sclpy.funct_string(link, pointer=0)

Python interface for O₂scl class funct_string, see https://awsteiner.org/code/o2scl/html/class/funct_string.html .

abstract __init__(link, pointer=0)

Init function for class funct_string

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class funct_string

__copy__()

Shallow copy function for class funct_string

Returns: funct_string object

__getitem__(x)
Parameters:
x: double
classmethod init(link, expr, var)

Constructor-like class method for funct_string .

Parameters:
set_parm(name, val)
Parameters:
name: string
val: double
Returns: a Python int

Class comm_option_s

class o2sclpy.comm_option_s(link, pointer=0)

Python interface for O₂scl class comm_option_s, see https://awsteiner.org/code/o2scl/html/class/comm_option_s.html .

__init__(link, pointer=0)

Init function for class comm_option_s

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class comm_option_s

__copy__()

Shallow copy function for class comm_option_s

Returns: comm_option_s object

get_desc()

Get object of type std::string

get_help()

Get object of type std::string

get_lng()

Get object of type std::string

get_parm_desc()

Get object of type std::string

property max_parms

Property of type ctypes.c_int

property min_parms

Property of type ctypes.c_int

set_desc(value)

Set object of type std::string

set_help(value)

Set object of type std::string

set_lng(value)

Set object of type std::string

set_parm_desc(value)

Set object of type std::string

property shrt

Property of type ctypes.c_char

property type

Property of type ctypes.c_int

Class cmd_line_arg

class o2sclpy.cmd_line_arg(link, pointer=0)

Python interface for O₂scl class cmd_line_arg, see https://awsteiner.org/code/o2scl/html/class/cmd_line_arg.html .

__init__(link, pointer=0)

Init function for class cmd_line_arg

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class cmd_line_arg

__copy__()

Shallow copy function for class cmd_line_arg

Returns: cmd_line_arg object

get_arg()

Get object of type std::string

get_parms()

Get object of type std::vector

property is_option

Property of type ctypes.c_bool

property is_valid

Property of type ctypes.c_bool

set_arg(value)

Set object of type std::string

set_parms(value)

Set object of type std::vector

Class cli

class o2sclpy.cli(link, pointer=0)

Python interface for O₂scl class cli, see https://awsteiner.org/code/o2scl/html/class/cli.html .

__init__(link, pointer=0)

Init function for class cli

Parameters:
link linker object
pointer ctypes.c_void_p pointer
__del__()

Delete function for class cli

__copy__()

Shallow copy function for class cli

Returns: cli object

apply_aliases(sv, istart, debug=False)
Parameters:
istart: size_t
debug =false: bool
Returns: a Python int
get_addl_help_cli()

Get object of type std::string

get_addl_help_cmd()

Get object of type std::string

get_cmd_name()

Get object of type std::string

get_desc()

Get object of type std::string

get_option_list()
Returns: std_vector_string object
property gnu_intro

Property of type ctypes.c_bool

option_short_desc(name)
Parameters:
name: string
Returns: Python bytes object
parameter_desc(name)
Parameters:
name: string
Returns: Python bytes object
parse_for_aliases(sv, allow_undashed, debug=False)
Parameters:
allow_undashed: bool
debug =false: bool
Returns: a Python int
set_addl_help_cli(value)

Set object of type std::string

set_addl_help_cmd(value)

Set object of type std::string

set_cmd_name(value)

Set object of type std::string

set_desc(value)

Set object of type std::string

set_verbose(v)
Parameters:
v: int
Returns: a Python int
property sync_verbose

Property of type ctypes.c_bool

Class shared_ptr_table_units

class o2sclpy.shared_ptr_table_units(link, shared_ptr=0)

Python interface for a shared pointer to a class of type table_units<>

__init__(link, shared_ptr=0)

Init function for shared_ptr_table_units .

__del__()

Delete function for shared_ptr_table_units .

Function rearrange_and_copy

o2sclpy.rearrange_and_copy(link, t, spec, verbose, err_on_fail)
Parameters:
link linker object
t: tensor object
spec: string
verbose: int
err_on_fail: bool
Returns: tensor object

Function rearrange_and_copy_int

o2sclpy.rearrange_and_copy_int(link, t, spec, verbose, err_on_fail)
Parameters:
link linker object
t: tensor object
spec: string
verbose: int
err_on_fail: bool
Returns: tensor_int object

Function rearrange_and_copy_size_t

o2sclpy.rearrange_and_copy_size_t(link, t, spec, verbose, err_on_fail)
Parameters:
link linker object
t: tensor object
spec: string
verbose: int
err_on_fail: bool
Returns: tensor_size_t object

Function grid_rearrange_and_copy

o2sclpy.grid_rearrange_and_copy(link, t, spec, verbose, err_on_fail)
Parameters:
link linker object
t: tensor_grid object
spec: string
verbose: int
err_on_fail: bool
Returns: tensor_grid object

Function fermi_function

o2sclpy.fermi_function(link, x)
Parameters:
link linker object
x: double
Returns: ctypes.c_double object

Function bose_function

o2sclpy.bose_function(link, x)
Parameters:
link linker object
x: double
Returns: ctypes.c_double object

Function quadratic_extremum_x

o2sclpy.quadratic_extremum_x(link, x1, x2, x3, y1, y2, y3)
Parameters:
link linker object
x1: double
x2: double
x3: double
y1: double
y2: double
y3: double
Returns: ctypes.c_double object

Function quadratic_extremum_y

o2sclpy.quadratic_extremum_y(link, x1, x2, x3, y1, y2, y3)
Parameters:
link linker object
x1: double
x2: double
x3: double
y1: double
y2: double
y3: double
Returns: ctypes.c_double object

Function screenify

o2sclpy.screenify(link, nin, in_cols, out_cols, max_size)
Parameters:
link linker object
nin: size_t
in_cols: vector object
out_cols: vector object
max_size: size_t

Function file_exists

o2sclpy.file_exists(link, fname)
Parameters:
link linker object
fname: string
Returns: ctypes.c_bool object

Function RGBtoHSV

o2sclpy.RGBtoHSV(link, r, g, b, h, s, v)
Parameters:
link linker object
r: double
g: double
b: double
h: double
s: double
v: double

Function HSVtoRGB

o2sclpy.HSVtoRGB(link, h, s, v, r, g, b)
Parameters:
link linker object
h: double
s: double
v: double
r: double
g: double
b: double

Function wordexp_single_file

o2sclpy.wordexp_single_file(link, fname)
Parameters:
link linker object
fname: std::string object

Function wordexp_wrapper

o2sclpy.wordexp_wrapper(link, word, matches)
Parameters:
link linker object
word: string
matches: std::vector object

Function function_to_double

o2sclpy.function_to_double(link, s, verbose)
Parameters:
link linker object
s: string
verbose: int
Returns: ctypes.c_double object

Function function_to_double_nothrow

o2sclpy.function_to_double_nothrow(link, s, result, verbose)
Parameters:
link linker object
s: string
result: double
verbose: int
Returns: ctypes.c_int object

Function find_constant

o2sclpy.find_constant(link, name, unit)
Parameters:
link linker object
name: string
unit: string
Returns: ctypes.c_double object

Function string_to_uint_list

o2sclpy.string_to_uint_list(link, x, list)
Parameters:
link linker object
x: std::string object
list: vector object
Returns: ctypes.c_int object

Function rewrap_keep_endlines

o2sclpy.rewrap_keep_endlines(link, str, sv, ncol, verbose, ignore_vt100)
Parameters:
link linker object
str: string
sv: std::vector object
ncol: size_t
verbose: int
ignore_vt100: bool

Function vector_level_count

o2sclpy.vector_level_count(link, level, n, x, y)
Parameters:
link linker object
level: double
n: size_t
x: std::vector object
y: std::vector object
Returns: ctypes.c_size_t object

Function vector_deriv_interp

o2sclpy.vector_deriv_interp(link, n, v, dv, interp_type)
Parameters:
link linker object
n: size_t
v: std::vector object
dv: std::vector object
interp_type: size_t

Function vector_deriv2_interp

o2sclpy.vector_deriv2_interp(link, n, v, dv, interp_type)
Parameters:
link linker object
n: size_t
v: std::vector object
dv: std::vector object
interp_type: size_t

Function vector_deriv_xy_interp

o2sclpy.vector_deriv_xy_interp(link, n, vx, vy, dv, interp_type)
Parameters:
link linker object
n: size_t
vx: std::vector object
vy: std::vector object
dv: std::vector object
interp_type: size_t

Function vector_deriv2_xy_interp

o2sclpy.vector_deriv2_xy_interp(link, n, vx, vy, dv, interp_type)
Parameters:
link linker object
n: size_t
vx: std::vector object
vy: std::vector object
dv: std::vector object
interp_type: size_t

Function vector_integ_interp

o2sclpy.vector_integ_interp(link, n, vx, interp_type)
Parameters:
link linker object
n: size_t
vx: std::vector object
interp_type: size_t
Returns: ctypes.c_double object

Function vector_integ_xy_interp

o2sclpy.vector_integ_xy_interp(link, n, vx, vy, interp_type)
Parameters:
link linker object
n: size_t
vx: std::vector object
vy: std::vector object
interp_type: size_t
Returns: ctypes.c_double object

Function vector_integ_ul_interp

o2sclpy.vector_integ_ul_interp(link, n, x2, v, interp_type)
Parameters:
link linker object
n: size_t
x2: double
v: std::vector object
interp_type: size_t
Returns: ctypes.c_double object

Function vector_integ_ul_xy_interp

o2sclpy.vector_integ_ul_xy_interp(link, n, x2, vx, vy, interp_type)
Parameters:
link linker object
n: size_t
x2: double
vx: std::vector object
vy: std::vector object
interp_type: size_t
Returns: ctypes.c_double object

Function vector_find_level

o2sclpy.vector_find_level(link, level, n, x, y, locs)
Parameters:
link linker object
level: double
n: size_t
x: std::vector object
y: std::vector object
locs: std::vector object

Function vector_invert_enclosed_sum

o2sclpy.vector_invert_enclosed_sum(link, sum, n, x, y, lev, boundaries, verbose, err_on_fail)
Parameters:
link linker object
sum: double
n: size_t
x: std::vector object
y: std::vector object
lev: double
boundaries: int
verbose: int
err_on_fail: bool

Function vector_region_int

o2sclpy.vector_region_int(link, n, x, y, intl, locs, boundaries, verbose, err_on_fail)
Parameters:
link linker object
n: size_t
x: std::vector object
y: std::vector object
intl: double
locs: std::vector object
boundaries: int
verbose: int
err_on_fail: bool
Returns: ctypes.c_int object

Function vector_region_fracint

o2sclpy.vector_region_fracint(link, n, x, y, intl, locs, boundaries, verbose, err_on_fail)
Parameters:
link linker object
n: size_t
x: std::vector object
y: std::vector object
intl: double
locs: std::vector object
boundaries: int
verbose: int
err_on_fail: bool
Returns: ctypes.c_int object

Function vector_bound_fracint

o2sclpy.vector_bound_fracint(link, n, x, y, frac, low, high, boundaries, verbose, err_on_fail)
Parameters:
link linker object
n: size_t
x: std::vector object
y: std::vector object
frac: double
low: double
high: double
boundaries: int
verbose: int
err_on_fail: bool
Returns: ctypes.c_int object

Function vector_bound_int

o2sclpy.vector_bound_int(link, n, x, y, frac, low, high, boundaries, verbose, err_on_fail)
Parameters:
link linker object
n: size_t
x: std::vector object
y: std::vector object
frac: double
low: double
high: double
boundaries: int
verbose: int
err_on_fail: bool
Returns: ctypes.c_int object

Function rebin_xy

o2sclpy.rebin_xy(link, x, y, x_out, y_out, n_pts, interp_type)
Parameters:
link linker object
x: std::vector object
y: std::vector object
x_out: std::vector object
y_out: std::vector object
n_pts: size_t
interp_type: size_t

Function linear_or_log_chi2

o2sclpy.linear_or_log_chi2(link, x, y)
Parameters:
link linker object
x: std::vector object
y: std::vector object
Returns: ctypes.c_double object

Function linear_or_log_pair

o2sclpy.linear_or_log_pair(link, x, y, log_x, log_y)
Parameters:
link linker object
x: std::vector object
y: std::vector object
log_x: bool
log_y: bool

Function vector_refine

o2sclpy.vector_refine(link, n, index, data, factor, interp_type)
Parameters:
link linker object
n: size_t
index: std::vector object
data: std::vector object
factor: size_t
interp_type: size_t

Function linear_or_log

o2sclpy.linear_or_log(link, x, log_x)
Parameters:
link linker object
x: std::vector object
log_x: bool

Function get_screen_size_ioctl

o2sclpy.get_screen_size_ioctl(link, row, col)
Parameters:
link linker object
row: int
col: int
Returns: ctypes.c_int object