ACEsuit / Polynomials4ML.jl

Polynomials for ML: fast evaluation, batching, differentiation
MIT License
12 stars 5 forks source link

compatibility with hyperduals #60

Closed CheukHinHoJerry closed 1 year ago

CheukHinHoJerry commented 1 year ago

We should probably introduce a new Union type instead of doing something like:

_valtype(::GaussianBasis, T::Type{<: Real}) = T
_valtype(::GaussianBasis, T::Type{<: Hyper{<:Real}}) = T

every time.

Due to this there is an issue with rtrig + hyperduals that I did a quick fix so that Bernie can use it. I will probably create a PR later today together with the above issue.

cortner commented 1 year ago

how does this relate to #27

CheukHinHoJerry commented 1 year ago

I think not quite related to SINGLE/BATCH. This is just something to reduce code repetition.

cortner commented 1 year ago

FWIW this repetition doesn't bother me at all. It seems very minor, just like documenting what type of inputs we allow. Why is it a problem?

CheukHinHoJerry commented 1 year ago

hmm what you say sounds right. I fixed this problem for multiple basis and that's why I think this might be an issue. Now I look at it again it should be minor. Will close this issue now.