mlprimitives.utils module

mlprimitives.utils.image_transform(X, function, reshape_before=False, reshape_after=False, width=None, height=None, **kwargs)[source]

Apply a function image by image.

Parameters
  • reshape_before – whether 1d array needs to be reshaped to a 2d image

  • reshape_after – whether the returned values need to be reshaped back to a 1d array

  • width – image width used to rebuild the 2d images. Required if the image is not square.

  • height – image height used to rebuild the 2d images. Required if the image is not square.

mlprimitives.utils.import_object(object_name)[source]

Import an object from its Fully Qualified Name.

mlprimitives.utils.np_aggregate(array, aggregation, skipna=True, *args, **kwargs)[source]