|
|
|
|
|
by lauriat
1992 days ago
|
|
Thanks! Good point. However setting def __bool__(self): return self.nonEmpty
would mess up certain methods e.g. .index for nested Arrays as __eq__ is computed elementwise and bool(Array(False, False)) would evaluate to True.Maybe a warning would be appropriate? (as is the case with ndarrays) |
|
Isn't that consistent with the built-in `list`, though, because `bool([False, False])` is True?