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

Operator x is parsed as a unit #195

Open
s2u7 opened this issue Jun 29, 2022 · 1 comment
Open

Operator x is parsed as a unit #195

s2u7 opened this issue Jun 29, 2022 · 1 comment

Comments

@s2u7
Copy link

s2u7 commented Jun 29, 2022

Describe the bug
Noticed that x operator in area dimension is parsed as a unit. Is there a way to exclude certain characters from being parsed as units.

To Reproduce
Steps to reproduce the behavior:

import quantulum3
from quantumlum3 import parser
quants = parser.parse('18 1/4 x 4 1/4  Floor Edge')
quants[0].surface

Expected behavior
'18 1/4'
** Actual behavior**
'18 1/4 x'

Screenshots
If applicable, add screenshots to help explain your problem.

Additional information:

  • Python Version: [3.8]
  • Classifier activated/ sklearn installed: [yes?]
  • OS: [Linus]
  • Version [20.0.4]

Additional context
Add any other context about the problem here.

@nielstron
Copy link
Owner

Is there a way to exclude certain characters from being parsed as units.

No unfortunately there is currently no way to do this.

When trying to run this, I get the following output:

[Quantity(18.25, "Unit(name="dimensionless", entity=Entity("dimensionless"), uri=Dimensionless_quantity)"), Quantity(4.25, "Unit(name="dimensionless", entity=Entity("dimensionless"), uri=Dimensionless_quantity)")]

which seems right to me?

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