Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Commit bf71141

Browse files
committed
stype: Commented out warnings about "deprecated" usage of "value slots".
Opened ilastik/ilastik#704, related to this.
1 parent 1ded88b commit bf71141

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lazyflow/stype.py

+13-3
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,20 @@ def writeIntoDestination( self, destination, value, roi ):
9292
try:
9393
destination[:] = value[sl]
9494
except TypeError:
95-
warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType")
95+
# FIXME: This warning used to be triggered by a corner case that could be encountered by "value slots".
96+
# The behavior here isn't truly deprecated. But we need a better solution for lazyflow 2.0.
97+
# See ilastik/ilastik#704
98+
#warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType")
9699
destination[:] = value
97100
else:
98101
sl = roiToSlice(roi.start, roi.stop)
99102
try:
100103
destination = value[sl]
101104
except:
102-
warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType")
105+
# FIXME: This warning used to be triggered by a corner case that could be encountered by "value slots".
106+
# The behavior here isn't truly deprecated. But we need a better solution for lazyflow 2.0.
107+
# See ilastik/ilastik#704
108+
#warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType")
103109
destination = [value]
104110

105111
if type(destination) == numpy.ndarray and destination.shape == ():
@@ -108,7 +114,11 @@ def writeIntoDestination( self, destination, value, roi ):
108114
# e.g. try this:
109115
# x = np.int64(5)
110116
# assert type(x[()]) == np.ndarray and x[()].shape == ()
111-
warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType")
117+
118+
# FIXME: This warning used to be triggered by a corner case that could be encountered by "value slots".
119+
# The behavior here isn't truly deprecated. But we need a better solution for lazyflow 2.0.
120+
# See ilastik/ilastik#704
121+
#warn_deprecated("old style slot encountered: non array-like value set -> change SlotType from ArrayLike to proper SlotType")
112122
destination = [value]
113123
return destination
114124

0 commit comments

Comments
 (0)