Skip to content

class DirectionalDerivative will not pickle field 'dim'

The init_arg_names in DirectionalDerivative (relevant code) does not contain field dim, which is added to the object in ancestor class Kernel.

I believe for now we could get around this by just adding dim to init_arg_names, but I suggest in the long run we should, across pytential and sumpy,

  1. get rid of __getinitargs__ all together, because it is not used in new-style classes for both Python 2 and Python 3.
  2. either call __init__ in __setstate__, or modify init_arg_names to includes all fields instead of just initialization arguments.

See a related issue in Pytential pytential#110 (closed).

Edited by Hao Gao