Module: vemomoto_core.npcollections.npext#

Created on 05.07.2016

@author: Samuel

Classes:

FlexibleArray(nparray[, copy, dtype, ...])

classdocs

FlexibleArrayDict(nparray[, fancyIndices])

FlexibleArrayDictColumnView(nparray[, ...])

FlexibleArrayIterator(flexibleArray)

csr_matrix_nd(listMatrix[, dtype])

Functions:

add_alias(arr, original, alias)

Adds an alias to the field with the name original to the array arr.

add_fields(array, names, dtypes[, fillVal])

add_names(arr, names[, sizes])

Adds a name to the data of an unstructured array.

as_dtype(arr, dtype)

binary_ceil(arr, digits)

binary_floor(arr, digits)

convert_R_0_1(x)

convert_R_0_1_reverse(x)

convert_R_pos(x)

convert_R_pos_reverse(x)

csr_list_to_csr_matrix(array[, dtype])

fields_view(arr, fields)

get_chunks(arr[, key, returnKeys])

get_precision_binary_digits(rTol)

in1d(a, b[, rtol, atol])

in1d2d(a, b[, rtol, atol])

list_to_csr_matrix(array[, dtype])

merge_arrays(arrays)

remove_fields(a, names)

a must be a numpy structured array.

sparsepower(arr, b)

sparsepowersum(arr, b)

sparsepowersum2D(arr, b)

sparseprod(arr)

sparsesum(arr)

sparsesum_chosen(arr, indices)

sparsesum_chosen_rows(arr, indices, rows)

sparsesum_chosen_rows_fact(arr, indices, ...)

sparsesum_row_prod(arr1, columns1, rows1, ...)

class FlexibleArray(nparray, copy=True, dtype=None, recArray=True, extentionFactor=2, pseudoShared=False)[source]#

Bases: object

classdocs

Methods:

add([data])

add_fields(names, dtypes[, fillVal])

cut()

exists(*indices)

expand([newlines])

extend(newRows)

get_array()

get_array_indices(column, equalCondition)

is_contiguous()

make_contiguous()

quick_add(**keywordData)

quick_add_tuple(data)

remove_fields(names)

add(data=None, **keywordData)[source]#
add_fields(names, dtypes, fillVal=None)[source]#
cut()[source]#
exists(*indices)[source]#
expand(newlines=None)[source]#
extend(newRows)[source]#
get_array()[source]#
get_array_indices(column, equalCondition)[source]#
is_contiguous()[source]#
make_contiguous()[source]#
quick_add(**keywordData)[source]#
quick_add_tuple(data)[source]#
remove_fields(names)[source]#
class FlexibleArrayDict(nparray, fancyIndices=None, **flexibleArrayArgs)[source]#

Bases: vemomoto_core.npcollections.npext.FlexibleArray

Methods:

add(index[, data])

exists(*indices)

extend(newRows)

get(index, *default)

getColumnView(column)

get_item_count()

quick_add(index, **keywordData)

quick_add_tuple(index, data)

add(index, data=None, **keywordData)[source]#
exists(*indices)[source]#
extend(newRows)[source]#
get(index, *default)[source]#
getColumnView(column)[source]#
get_item_count()[source]#
quick_add(index, **keywordData)[source]#
quick_add_tuple(index, data)[source]#
class FlexibleArrayDictColumnView(nparray, fancyIndices=None, **flexibleArrayArgs)[source]#

Bases: vemomoto_core.npcollections.npext.FlexibleArrayDict, object

Methods:

add([data])

add_fields(names, dtypes[, fillVal])

expand([newlines])

extend()

new(flexibleArray, column)

quick_add(**keywordData)

remove_fields(names)

add(data=None, **keywordData)[source]#
add_fields(names, dtypes, fillVal=None)[source]#
expand(newlines=None)[source]#
extend()[source]#
static new(flexibleArray, column)[source]#
quick_add(**keywordData)[source]#
remove_fields(names)[source]#
class FlexibleArrayIterator(flexibleArray)[source]#

Bases: object

add_alias(arr, original, alias)[source]#

Adds an alias to the field with the name original to the array arr. Only one alias per field is allowed.

add_fields(array, names, dtypes, fillVal=None)[source]#
add_names(arr, names, sizes=None)[source]#

Adds a name to the data of an unstructured array.

as_dtype(arr, dtype)[source]#
binary_ceil(arr, digits)[source]#
binary_floor(arr, digits)[source]#
convert_R_0_1(x)[source]#
convert_R_0_1_reverse(x)[source]#
convert_R_pos(x)[source]#
convert_R_pos_reverse(x)[source]#
csr_list_to_csr_matrix(array, dtype='double')[source]#
class csr_matrix_nd(listMatrix, dtype='double')[source]#

Bases: object

Attributes:

HighDimAccessError

HighDimAccessError = NotImplementedError('Access to subarrays of dimension higher than 1 is not yet supported.')#
fields_view(arr, fields)[source]#
get_chunks(arr, key=None, returnKeys=False)[source]#
get_precision_binary_digits(rTol)[source]#
in1d(a, b, rtol=1e-06, atol=0)[source]#
in1d2d(a, b, rtol=1e-06, atol=0)[source]#
list_to_csr_matrix(array, dtype='double')[source]#
merge_arrays(arrays)[source]#
remove_fields(a, names)[source]#

a must be a numpy structured array. names is the collection of field names to remove.

Returns a view of the array a (not a copy).

sparsepower(arr, b)[source]#
sparsepowersum(arr, b)[source]#
sparsepowersum2D(arr, b)[source]#
sparseprod(arr)[source]#
sparsesum(arr)[source]#
sparsesum_chosen(arr, indices)[source]#
sparsesum_chosen_rows(arr, indices, rows)[source]#
sparsesum_chosen_rows_fact(arr, indices, rows, factor)[source]#
sparsesum_row_prod(arr1, columns1, rows1, rowsColumns, arr2, rows2)[source]#