Closed grovduck closed 3 months ago
@aazuspan, my reasoning in #69 on this error was flawed and I thought it would be a good idea to keep this separate. I've also added a slight change to the CI config to explicitly list the dependency package versions used in the CI tests. There might be a way to get this info from the CI logs already, but I coudn't find it.
As part of using the Array API for
r2_score
, the return value ofr2_score
is now cast explicitly as afloat
rather thannp.float64
when it is a scalar value.From this doc:
In
test_port.test_score_independent
, we were callingr2_score
using the defaultmultioutput="uniform_average"
which was returning a singlenp.float64
. We were then mistakenly calling.mean()
on this value which had not previously thrown an error because it was operating on anp.float64
. With the change in return type, this test now throws an error atscikit-learn>=1.5
.Simply removing
.mean()
corrects this test.