Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alignment_to_matrix "counts" takes an np.array not a list #25

Open
leandrosz opened this issue Sep 7, 2022 · 1 comment
Open

alignment_to_matrix "counts" takes an np.array not a list #25

leandrosz opened this issue Sep 7, 2022 · 1 comment

Comments

@leandrosz
Copy link

leandrosz commented Sep 7, 2022

Hi! I noticed that when building a matrix from alignment and providing the "counts" parameter with a list of non-zero-integers I get an error:

Traceback (most recent call last):
[...]
File "/.../logomaker/src/error_handling.py", line 102, in wrapped_func
result = func(*args, **kwargs)
File "/---/logomaker/src/matrix.py", line 583, in alignment_to_matrix
tmp_mat = (char_array == c).astype(float) * counts[:, np.newaxis]
TypeError: list indices must be integers or slices, not tuple

When checking the source code I noticed this could be because I was providing a list and not an numpy.array object, and by doing changing that it all worked. I'm just letting you know because in the help it says input should be "None or list of numbers".

Thanks for the awesome work!

[EDIT] I'm using logomaker 0.8 in Python 3.8

@atareen
Copy link
Collaborator

atareen commented Sep 8, 2022

Hello Leandro,

Thanks! I'll update the code and fix this in a new logomaker release.

Ammar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants