forensicfit.utils.array_tools module#

forensicfit.utils.array_tools.serializer(indict)[source]#

Serilizes any given dictionary for mongodb.

Return type:

dict

Parameters:

indict (dict) – input dictionary

forensicfit.utils.array_tools.vote_calculator(prediction)[source]#
Return type:

ndarray

forensicfit.utils.array_tools.read_bytes_io(obj, method='numpy')[source]#

reads a binary file stored in mongodb and returns a numpy array

Return type:

array

Parameters:

obj (GridOut) – output from a mongodb girdfs file

Returns:

numpy array containing the information loaded from gridfs file

Return type:

np.array

forensicfit.utils.array_tools.write_bytes_io(obj, method='numpy')[source]#
Return type:

BytesIO