module tools.code_helper
#
Short summary#
module mlprodict.tools.code_helper
A couple of tools unrelated to what the package does.
Functions#
function |
truncated documentation |
---|---|
Dumps an object for debug purpose. |
|
Displays informations on an object. |
|
Creates a callable function able to cope with default values as the combination of functions compile and exec … |
|
Returns the maximum of an array. Deals with text as well. |
|
Returns the maximum of an array. Deals with text as well. |
|
Returns the minimum of an array. Deals with text as well. |
|
Returns the code with line number. |
Documentation#
A couple of tools unrelated to what the package does.
- mlprodict.tools.code_helper.debug_dump(clname, obj, folder=None, ops=None)#
Dumps an object for debug purpose.
- Parameters:
clname – class name
obj – object
folder – folder
ops – operator to dump
- Returns:
filename
- mlprodict.tools.code_helper.debug_print(k, obj, printed)#
Displays informations on an object.
- Parameters:
k – name
obj – object
printed – memorizes already printed object
- mlprodict.tools.code_helper.make_callable(fct, obj, code, gl, debug)#
Creates a callable function able to cope with default values as the combination of functions compile and exec does not seem able to take them into account.
- Parameters:
fct – function name
obj – output of function compile
code – code including the signature
gl – context (local and global)
debug – add debug function
- Returns:
callable functions
- mlprodict.tools.code_helper.numpy_max(x)#
Returns the maximum of an array. Deals with text as well.
- mlprodict.tools.code_helper.numpy_min(x)#
Returns the maximum of an array. Deals with text as well.
- mlprodict.tools.code_helper.numpy_min_max(x, fct, minmax=False)#
Returns the minimum of an array. Deals with text as well.
- mlprodict.tools.code_helper.print_code(code, begin=1)#
Returns the code with line number.