hoxo-m / densratio_py

A Python Package for Density Ratio Estimation
https://github.com/hoxo-m/densratio_py
Other
127 stars 30 forks source link

Fix tests.test_RuLSIF::test_alphadensratio_2d ValueError #18

Open mierzejk opened 1 year ago

mierzejk commented 1 year ago

Fixes ValueError in tests.test_RuLSIF::test_alphadensratio_2d by replacing 1d linspace with 2d array as the compute_density_ratio function argument. Code changes basically follow the README multivariate example.
Please note the error is raised when set_compute_kernel_target is set to numba (cpu or parallel targets). For numpy (default if numba is unavailable) the test passes.

Resolves #17 issue.

mierzejk commented 1 year ago

Please note that all commits covered by this pull request are also included in #23 Aggregated pull request.