Skip to content

Conversation

@ZhiyLiu
Copy link

@ZhiyLiu ZhiyLiu commented Jul 21, 2020

PR Checklist

  • No API changes were made (or the changes have been approved)
  • No major design changes were made (or the changes have been approved)
  • Added test (or behavior not changed)
  • Updated API documentation (or API not changed)
  • Added license to new files (if any)
  • Added Python wrapping to new files (if any) as described in ITK Software Guide Section 9.5
  • Added ITK examples for all new major features (if any)

Refer to the ITK Software Guide for
further development details if necessary.

with memoryview(obj) as m:
obj = m.obj
if type(obj) is np.ndarray:
return cls(obj, itk_base=None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion here:

The above two methods should be replaced with something like:

def __reduce__(self):
    np_copy = np.array(self, copy=True)
    pickled_state = super(NDArrayITKBase, np_copy).__reduce__()
    return pickled_state

@thewtex
Copy link
Member

thewtex commented Aug 6, 2020

Superceded by #1942

@thewtex thewtex closed this Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants