Skip to content

Commit

Permalink
Fixed PatternGenerator getitem for patterns with zero declared channels
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 19, 2015
1 parent d80b415 commit bfe83c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagen/patterngenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def __call__(self,**params_to_override):

def __getitem__(self, coords):
value_dims = {}
if self.num_channels() == 1:
if self.num_channels() in [0, 1]:
raster, data = Image, self()
value_dims = {'value_dimensions':[self.z]} if self.z else value_dims
elif self.num_channels() in [3,4]:
Expand Down

0 comments on commit bfe83c3

Please sign in to comment.