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

base representation for multidimensional array raised exception #56

Closed
ruoting0103 opened this issue Feb 15, 2022 · 2 comments
Closed

Comments

@ruoting0103
Copy link

arr_fxp.bin() for arr_fxp = Fxp(np.array([[1,2]])) raised the following exception:

rval = [ utils.binary_repr(int(val.real), n_word=self.n_word, n_frac=n_frac_dot) + '+' + utils.binary_repr(int(val.imag), n_word=self.n_word, n_frac=n_frac_dot) + 'j' for val in self.val]

TypeError: only size-1 arrays can be converted to Python scalars

@francof2a
Copy link
Owner

Thanks for the issue. It wasn't take into account multidimensional arrays in those representation methods.

I fixed that in the unreleased 0.4.6 version. So, in the next release it will be solved!

@francof2a francof2a mentioned this issue Apr 1, 2022
@francof2a
Copy link
Owner

Issue solved in v0.4.6

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