Commit 940b19a5 authored by Jon Crall's avatar Jon Crall
Browse files

Improved channel spec len warning

parent 9c10ea30
Pipeline #248046 passed with stages
in 4 minutes and 17 seconds
......@@ -161,13 +161,17 @@ class FusedChannelSpec(BaseChannelSpec):
def __len__(self):
import warnings
warnings.warn(ub.paragraph(
'''
Length Definition for FusedChannelSpec is in flux.
It is unclear if it should be the number of atomic codes or the
expanded "numel", which is the number of "normalized" atomic codes.
'''))
if not self._is_normalized:
warnings.warn(ub.paragraph(
'''
Length Definition for unormalized FusedChannelSpec is in flux.
It is unclear if it should be the (1) number of atomic codes or
(2) the expanded "numel", which is the number of "normalized"
atomic codes. Currently it returns the number "unnormalized"
atomic codes. Normalizing the FusedChannelSpec object or using
"numel" will supress this warning.
'''))
return len(self.parsed)
def __getitem__(self, index):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment