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

number trait #85

Closed
wangjiawen2013 opened this issue Sep 20, 2024 · 2 comments
Closed

number trait #85

wangjiawen2013 opened this issue Sep 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@wangjiawen2013
Copy link
Contributor

wangjiawen2013 commented Sep 20, 2024

Hi,
Now we must check the type U to make sure it is a number, is it better to define a number trait to make full use of rust's type system and the type checking ?
image

@cpmech
Copy link
Owner

cpmech commented Sep 20, 2024

It is a good idea to auto check for number types. We could use num-traits as I did in https://github.com/cpmech/russell

When I started plotpy, I didn't know about num-traits... I think this would require some effort to implement now.

@cpmech cpmech added the enhancement New feature or request label Sep 20, 2024
@cpmech
Copy link
Owner

cpmech commented Sep 25, 2024

This has been improved with num-traits. See #94

@cpmech cpmech closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants