thank you for providing this toolbox. We noticed some problems with the type hints:
waverec(coeffs: List[torch.Tensor]) -> It would be nice to use Sequence[torch.Tensor] here. This would also allow to be called with a tuple of Tensors. The function should not modify the list of tensors nor depend on it actually being a list.
wavedec2( ... ) -> List[Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor, torch.Tensor]]]
It would be nicer if this could be changed to return tuple[torch.Tensor, tuple[*tuple[torch.Tensor, torch.Tensor, torch.Tensor],...]
This would mean that the return is always a tuple with the first entry a tensor, followed by an arbitrary number of tuples of 3 tensors.
Currently, the type hint says that a) the first entry can also be a tuple and b) the later entries can also be tensors (although they should only be tuples..)
It would be nice to return tighter types. And take sequences instead of lists as input for all public functions.
I would be willing to create a PR if there would be interest do do the change.
Hi,
thank you for providing this toolbox. We noticed some problems with the type hints:
waverec(coeffs: List[torch.Tensor])
-> It would be nice to use Sequence[torch.Tensor] here. This would also allow to be called with a tuple of Tensors. The function should not modify the list of tensors nor depend on it actually being a list.wavedec2( ... ) -> List[Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor, torch.Tensor]]]
It would be nicer if this could be changed to returntuple[torch.Tensor, tuple[*tuple[torch.Tensor, torch.Tensor, torch.Tensor],...]
This would mean that the return is always a tuple with the first entry a tensor, followed by an arbitrary number of tuples of 3 tensors. Currently, the type hint says that a) the first entry can also be a tuple and b) the later entries can also be tensors (although they should only be tuples..)It would be nice to return tighter types. And take sequences instead of lists as input for all public functions.
I would be willing to create a PR if there would be interest do do the change.