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

Add a ULAB_PRINT_DTYPE constant #602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HugoNumworks
Copy link
Contributor

I don't know if it is something you would like to add, but I added a small option for the display of "dtype=..." when printing an array.

@v923z
Copy link
Owner

v923z commented Apr 24, 2023

I'm not against it, but there seems to be some discrepancy in numpy itself. What is the rule for printing dtype?

@HugoNumworks
Copy link
Contributor Author

there seems to be some discrepancy in numpy itself

I don't use Numpy very often, but I think I have never seen the dtype printed alongside the array, in which case does it happen ?

@v923z
Copy link
Owner

v923z commented Apr 24, 2023

there seems to be some discrepancy in numpy itself

I don't use Numpy very often, but I think I have never seen the dtype printed alongside the array, in which case does it happen ?

This doesn't print the dtype:

>>> linspace(0, 10, num=11)
array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10.])

@HugoNumworks
Copy link
Contributor Author

there seems to be some discrepancy in numpy itself

I don't use Numpy very often, but I think I have never seen the dtype printed alongside the array, in which case does it happen ?

This doesn't print the dtype:

>>> linspace(0, 10, num=11)
array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10.])

Sorry, I meant to ask : In which case does Numpy display the dtype ?

I'm adding the option in here so that it is now possible to disable the display of "dtype=".
Currently, it is always displayed, so I set ULAB_PRINT_DTYPE to 1 by default, but my goal is to be able to deactivate it.

@v923z
Copy link
Owner

v923z commented May 16, 2023

Sorry, I meant to ask : In which case does Numpy display the dtype ?

I don't know, and that's why I would like to hold off with this, till it is sorted out.

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

Successfully merging this pull request may close these issues.

2 participants