Re: [Numpy-discussion] Removal of numarray and oldnumeric packages.

2013-09-24 Thread Peter Cock
On Mon, Sep 23, 2013 at 10:53 PM, Charles R Harris
 wrote:
> On Mon, Sep 23, 2013 at 3:18 PM, Charles R Harris wrote:
>> On Mon, Sep 23, 2013 at 2:42 PM, Peter Cock wrote:
>>>
>>> Hi Chuck,
>>>
>>> Could you clarify how we'd know if this is a problem in a large package?
>>> i.e. Is it just Python imports I need to double check, or also C level?
>>>
>>
>> Just Python level unless you are calling python from C. The packages are
>> not normally imported, so you should be able to just grep through. You could
>> also apply the patch and see what happens. That might be the best test.
>
> I take that back. There is a _capi.c and include files for numarray.
>
> Chuck

Thanks - I just ran our test suite against numpy compiled from
that commit: https://github.com/numpy/numpy/pull/3638

We seem to be OK, so I have no objection to removing this.

Peter
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Pull request review #3770: Trapezoidal distribution

2013-09-24 Thread josef . pktd
On Mon, Sep 23, 2013 at 1:40 PM, Jeremy Hetzel  wrote:
> On Sun, Sep 22, 2013 at 9:47 AM, Mark Szepieniec  wrote:
>>
>>
>> On Sun, Sep 22, 2013 at 1:24 PM,  wrote:
>>>
>>>
>>> I don't see a reason that numpy.random shouldn't get new
>>> distributions. It would also be useful to add the corresponding
>>> distribution to scipy.stats.
>
>
> I have the pdf, cdf, and inverse cdf for the generalized trapezoidal. I've
> looked through the other distributions at scipy.stats and adding this one
> should not be difficult. I'll work on it next.

Thank you

>
>>>
>>>
>>> naming: n, m would indicate to me that they are integers, but it they
>>> can be floats (>0)
>>> alpha, beta ?
>
>
> The three additional parameters for growth rate, decay rate, and boundary
> ratio are floats > 0. I renamed them from `m`, `n`, and `alpha` (which is
> how they're parameterized in the published probability density function) to
> simply `growth`, `decay`, and `ratio`.  Does that fit into the NumPy style?
> It feels intuitive to me.

`growth`, `decay`, and `ratio` sounds much better
we try also in scipy.stats to move away from some of the one letter
argument names.

>
>
>>>
>>>
>>> Is there a standard version, e.g. left=0, right=1, mode1=?, ... ?
>>>
>>> In scipy.stats.distribution we are required to use a location, scale
>>> parameterization, where loc shifts the distribution and scale
>>> stretches it.
>>> Is there a standard parameterization for that?, for example
>>> left = loc = 0 (default) or left = loc / scale = 0
>>> right = scale = 1 (default)
>>> mode1_relative = mode1 / scale
>>> mode2_relative = mode2 / scale
>>> n, m unchanged no defaults
>>>
>>> just checked:
>>> your naming corresponds to triangular, and triang in scipy has the
>>> corresponding loc-scale parameterization.
>
>
> Thanks. There is no standard version of the distribution that I'm aware of,
> but for the purposes of scipy.stats, left=0, right=1 and mode1, mode2 being
> either 0.25, 0.75 or 1/3, 2/3, seem reasonable. I'll give more thought to
> the location and scale and send an email to scipy-dev if I need guidance.
> Looking at scipy.stats.triang, my initial thought is:
> left_relative = loc
> mode1_relative = loc + mode1*scale
> mode2_relative = loc + mode2*scale
> right_relative = loc + scale
> growth, decay, and ratio are unchanged.

mode1 and mode2 don't need a default, they can be shape parameters
which don't have defaults in scipy.stats.

with left=0, right=1 hard coded in the formulas, we have a "standard"
version and get the transformation with loc and scale

The implied parameterization looks good,
terminology ?
mode1, mode2 are "relative" to right - left, based on 0,1 interval
(in fractions of left - right length)
your `xxx_relative` are the actual values on the real line, i.e. not
relative to loc and scale

(It's actually the same as with triang, which I had forgotten to look
at initially.)

Josef

>
>>
>>
>> I think you need to s/first/second in the description of the mode2
>> parameter?
>
>
> Thanks for catching that. Fixed in a recent commit. mode2 should be the
> second peak of the distribution.
>
>
> Jeremy
>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Removal of numarray and oldnumeric packages.

2013-09-24 Thread Richard Hattersley
On 23 September 2013 18:03, Charles R Harris wrote:

> I have gotten no feedback on the removal of the numarray and oldnumeric
> packages. Consequently the removal will take place on 9/28. Scream now or
> never...
>

I know I always like to get feedback either way ... so +1 for removal.
Thanks.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion