cpmech / plotpy

Rust plotting library using Python (Matplotlib)
MIT License
65 stars 6 forks source link

number trait #85

Closed wangjiawen2013 closed 1 month ago

wangjiawen2013 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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