Browse Source

Merge pull request #92 from jimrybarski/91-deprecation

added data attribute back with deprecation warning
master
Jim Rybarski 9 years ago
parent
commit
ad947f20cf
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      nd2reader/model/image.py

+ 6
- 0
nd2reader/model/image.py View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import numpy as np
import warnings
class Image(np.ndarray):
@ -97,3 +98,8 @@ class Image(np.ndarray):
"""
return self._z_level
@property
def data(self):
warnings.warn("Image objects now directly subclass Numpy arrays, so using the data attribute will be removed in the near future.", DeprecationWarning)
return self

Loading…
Cancel
Save