[SciPy-dev] subversion commit policy for rename files question
Fri Nov 21 23:25:57 CST 2008
On Fri, Nov 21, 2008 at 23:10, <firstname.lastname@example.org> wrote:
> On Fri, Nov 21, 2008 at 11:30 PM, Robert Kern <email@example.com> wrote:
>> On Fri, Nov 21, 2008 at 21:29, <firstname.lastname@example.org> wrote:
>>> I want to do the renaming and importing in __all__ discussed here:
>>> For this I had to resolve some circular imports and add some missing
>>> functions to __all__.
>>> Is there a policy whether renames should be committed separately or
>>> can it be together with changes in the file,
>>> or it doesn't matter?
>> I take my "doesn't matter" back. Yes, please do file renames and
>> internal modifications separately.
>> Robert Kern
> Thanks, I will do it in several steps.
> All tests pass (after making sure that no old stuff is lying around),
> but not every function is tested.
> Also np.lookfor picks it up
> given our previous discussion, and the wikipedia definition of
> percentileofscore, I don't see any reason not to do a very simple
> Initially, I thought the proposed implementation can be vectorized,
> but I don't see how. Without vectorization, this version looks much
> simpler and, I guess, should be about as fast:
> import numpy as np
> def percentileofscore(a, score, kind = 'mean' ):
> n = len(a)
> if kind == 'strict':
> return sum(a<score) / float(n) * 100
> elif kind == 'weak':
> return sum(a<=score) / float(n) * 100
> elif kind == 'mean':
> return (sum(a<score) + sum(a<=score)) * 50 / float(n)
> raise NotImplementedError
> If you think this is ok, I put it in svn, I'm not sure whether to call
> the type, "kind", doctest pass the same as previous version
I'd raise a ValueError with a message stating that 'strong', 'weak',
and 'mean' are the only correct values, but otherwise, that looks
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Scipy-dev