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

Precision error when numpy.reshape #77

Closed
Ethan-lsh opened this issue Dec 28, 2022 · 1 comment
Closed

Precision error when numpy.reshape #77

Ethan-lsh opened this issue Dec 28, 2022 · 1 comment

Comments

@Ethan-lsh
Copy link

Hello.

Now I'm writing the code to implement a mvm operation on fixed-point with numpy and fxpmath.

However, when I applied the numpy.reshape at the array made by fxpmath, the fract bits was remaind but the word bits changed.

This is my code.

a = np.array([[0.762, 0.525], [0.345, 0.875]], dtype=complex)
x = Fxp(a, signed=True, n_word=5, n_frac=3)
# fxp-s5/3-complex

y = np.reshape(x, (1, 4))
# fxp-s4/3-complex

In my opinion, this is because that the numpy cannot fully recognize the sign bit.

Please, let me know how I can solve this issue.

Thanks.

francof2a added a commit that referenced this issue Jan 19, 2024
…timal size instead of same by default (issue #77).
@francof2a francof2a mentioned this issue Feb 7, 2024
@francof2a
Copy link
Owner

solved in v0.4.9

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