vlang / vsl

V library to develop Artificial Intelligence and High-Performance Scientific Computations
https://vlang.github.io/vsl
MIT License
351 stars 44 forks source link

Add support of `[]int` to `plot` axis types #178

Closed ArtemkaKun closed 11 months ago

ArtemkaKun commented 11 months ago

Describe the feature

Currently plot sumtypes XType and YType correspondingly represent values of the X and Y axis have definition []f64 | []string. These sumtypes also should support []int type

Use Case

For example, Is V still fast? values are ints, and when someone wants to use it for plot they need to be converted to []f64 which adds complexity to the code and hits performance.

Proposed Solution

type AxisType = []f64 | []string | []int

pub type XType = AxisType

pub type YType = AxisType

Other Information

No response

Acknowledgements

Version used

6904d720c50558a5d66dc97c346d9c4671213727

Environment details (OS name and version, etc.)

Not related