MAINT get rid of compiler warnings
Here's a patch from the scikit-learn fork of Liblinear. It doesn't do much, but it shuts up the compiler.
We knew this problem but didn't think
double Gnorm1_init = 0.;
is a good thing because some may ask why the initial norm should be set to zero. Is it better to use
double Gnorm1_init = NULL;
??
Lars Buitinck writes:
Here's a patch from the scikit-learn fork of Liblinear. It doesn't do much, but it shuts up the compiler.
You can merge this Pull Request by running
git pull https://github.com/larsmans/liblinear master
Or view, comment on, or merge it at:
https://github.com/cjlin1/liblinear/pull/3
Commit Summary
- MAINT get rid of compiler warnings from Liblinear
File Changes
- M linear.cpp (6)
Patch Links:
- https://github.com/cjlin1/liblinear/pull/3.patch
- https://github.com/cjlin1/liblinear/pull/3.diff
— Reply to this email directly or view it on GitHub.*
NULL is not a valid value for a double because it's a pointer value.
Thanks. We plan to use -1 (rather than 0) now.
Lars Buitinck writes:
NULL is not a valid value for a double because it's a pointer value.
— Reply to this email directly or view it on GitHub.*
Do you intend to take the pull request?
Sounds like a good idea, with -1 as an initial value.
This issue was moved to angleto/liblinear#3