Wrappers#

This module contains the wrappers for interfacing with MATLAB custom functions, such as those for custom layers models or function backgrounds.

class RATapi.wrappers.DylibWrapper(filename, function_name)#

Creates a python callback for a function in dynamic library.

Parameters:
  • filename (str) – The path of the dynamic library

  • function_name (str) – The name of the function to call

getHandle()#

Returns a wrapper for the custom dynamic library function

Returns:

wrapper – The wrapper function for the dynamic library callback

Return type:

Callable[[ArrayLike, ArrayLike, ArrayLike, int, int], tuple[ArrayLike, float]]

class RATapi.wrappers.MatlabWrapper(filename)#

Creates a python callback for a MATLAB function.

Parameters:

filename (string) – The path of the file containing MATLAB function

getHandle()#

Returns a wrapper for the custom MATLAB function

Returns:

wrapper – The wrapper function for the MATLAB callback

Return type:

Callable[[ArrayLike, ArrayLike, ArrayLike, int, int], tuple[ArrayLike, float]]

RATapi.wrappers.start_matlab()#

Starts MATLAB asynchronously and returns a future to retrieve the engine later

Returns:

future – A future used to get the actual matlab engine

Return type:

matlab.engine.futureresult.FutureResult