Subject: | PDL::Stats::Basic exports non-statistics functions |
Hi,
Thanks very much for your work on PDL::Stats. It's a great addition to PDL.
Might I make a few suggestions about a few functions in
PDL::Stats::Basic, namely get_data, which_id, and n_pair? These routines
seem to be somewhat peripheral to the other functions in
PDL:Stats::Basic, and I think they might be better placed in other modules.
For example, get_data() is a data input routine which appears similar in
nature to PDL::IO::Misc::rcols(). If its functionality can't be rolled
into rcols(), then perhaps it should be moved into that package.
Similarly, which_id is a generic indexing routine; it might be grouped
with the other indexing routines in PDL::Primitive. n_pair() is a
generic bad value routine; it would probably be better placed in a
PDL::Bad::Misc package.
Currently these routines are automatically exported, and because they
are named somewhat generically, there is a good chance that they will
conflict with existing code. For example, I often have a get_data()
subroutine. Because PDL::Stats::Basic exports get_data by default, Perl
complains about get_data being redefined. n_pair is perhaps better named
"n_good_pairs".
Might I suggest not exporting this routines?
Thanks,
Diab