SimPEG.utils.create_wrapper_from_class#
- SimPEG.utils.create_wrapper_from_class(input_class, *fun_names)[source]#
- Create wrapper class with memory profiler. - Using - memory_profiler.profile(), this function creates a wrapper class from the input class and function names specified.- Parameters
- Returns
- class
- Wrapper class 
 
 - Examples - >>> foo_mem = create_wrapper_from_class(foo,['my_func']) >>> fooi = foo_mem() >>> for i in range(5): >>> fooi.my_func() - Then run it from the command line - python -m memory_profiler exampleMemWrapper.py