Grid __init__ is called twice if the grid is loaded from a file. AFAIK this is not a good practice and can break extended Grid classes. Example below:
from gridData import Grid
class NewGrid(Grid):
def __init__(self, new_stuff=None, grid=None, edges=None, origin=None, delta=None,
metadata=None, interpolation_spline_order=3, file_format=None):
if new_stuff:
print('loading new stuff')
else:
print('crashing because new_stuff is None')
super().__init__(grid, edges, origin, delta,
metadata, interpolation_spline_order, file_format)
aa = NewGrid('new_stuff', 'test_grid.pkl')
loading new stuff
crashing because new_stuff is None
Grid __init__ is called twice if the grid is loaded from a file. AFAIK this is not a good practice and can break extended Grid classes. Example below:
Sending a PR to fix it soon.