sively with relational databases (sql server, mysql, etc) and
all (most?) of the python database adapters use python datetime objects
when passing data back and forth from the database to python. So people wanting
to analyze date / time series data from relational databases in n
David Carmean halibut.com> writes:
>
>
> I understand that ma.MaskedArray is a subclass of ndarray; in addition to
> the requirements for subclassing the latter, what does ma.MaskedArray add to
> the list? I.e. what do I have to watch out for?
You may want to take a look at the TimeSeries cl
Martin Raspaud smhi.se> writes:
> We are using at the moment a c extension which should manipulate masked
> arrays.
> What we do is to fill the masked array with a given value (say 65535 if we run
> uint16 arrays), do the manipulation, and convert back to masked arrays when we
> go back to pytho
gmail.com> writes:
> So, while python won't get any "industrial strength" finance package,
> a more modest "designer package" would be feasible, if there were any
> interest in it (which I haven't seen).
>
> ...
>
> The even more modest question is whether we would want to match open
> office i
forgive me for jumping in on this thread and playing devil's advocate here, but
I am a natural pessimist so please bear with me :) ...
I think as this discussion has already demonstrated, it is *extremely*
difficult to build a solid general purpose API for financial functions (even
seemingly simpl
> Robert Kern gmail.com> writes:
>
> seterr() uses thread-local storage.
Oh. I stand corrected. Ignore my earlier objections then.
> Pierre GM gmail.com> writes:
>
> Also, importing numpy.ma currently calls numpy.seterr(all='ignore')
> anyway...
hmm. While this doesn't affect me personally..
Hi Pierre,
> Here's the catch: it's basically cheating. I got rid of the pre-
> processing (where a mask was calculated depending on the domain and
> the input set to a filling value depending on this mask, before the
> actual computation). Instead, I force
> np.seterr(divide='ignore',inva
>> >> If it's really just weekdays why not call it that instead of using a
>> >> term like business days that (quite confusingly) suggests holidays
>> >> are handled properly?
>>
>> Well, we were adopting the name from the TimeSeries package. Perhaps
>> the authors can answer this better than me.
>> For this goal, we are proposing a decoupling of the date/time use cases
>> in two different groups:
>>
>> 1. A pure ``datetime`` dtype (absolute or relative) that would be useful
>> for timestamping purposes in general (i.e. registering dates without a
>> need that they be evenly spaced in ti
> Maybe you are right, but by providing many resolutions we are trying to
> cope with the needs of people that are using them a lot. In
> particular, we are willing that the authors of the timseries scikit can
> find on these new dtype a fair replacement of their Date class (our
> proposal wil
Christopher Barker noaa.gov> writes:
>> I'm also imaging some extra utility functions/method that would be nice:
>>
>> aDateTimeArray.hours(dtype=float)
>>
>> to convert to hours (and days, and seconds, etc). And maybe some that
>> would create a DateTimeArray from various time units.
The Dat
I guess this question is mostly for Stefan... but I am trying to port the
scikits.timeseries module wiki documentation into a sphinx framework, and
also
trying to follow the numpy doc string standards (which can't be parsed
directly
by sphinx), so I'm trying to use the SphinxDocString class in
doc
> ==
> ERROR: test_hdquantiles
> (numpy.ma.tests.test_morestats.TestQuantiles)
> --
You have some kind of franken-build going on there. test_morestats has long
s
> 1. Is there a module or other code to write arrays to databases (they want
access databases)?
There are three python odbc modules (mxODBC, ceODBC, pyodbc), all of which
should allow you to connect to access databases. I've played around with all
three and my personal favourite is ceODBC (which i
> installed fine and all tests ran successfully on my machine.
I spoke too soon. I didn't know about the "all" parameter in numpy.test and
just ran if with the default before. When I specify all=True, I get 12 errors.
Most of which seem to be related to a problem with calling the "tolist"
method.
David Cournapeau ar.media.kyoto-u.ac.jp> writes:
>
> Hi,
>
> Sorry for the delay, but it is now ready: numpy "superpack"
> installers for numpy 1.1.0rc1:
>
>
http://www.ar.media.kyoto-u.ac.jp/members/david/archives/numpy-1.1.0rc1-win32-superpack-python2.5.exe
>
http://www.ar.media.kyoto-u
Chris,
The behaviour you are seeing is intentional. Pierre is correct in asserting that
it is not a bug. Now, you may disagree with the behaviour, but the behaviour is
by design and is not a bug. Perhaps you are misunderstanding how to use masked
arrays, which is understandable because the documen
>
> OK, my specific problem with masked arrays is as follows:
>
> >>> a = numpy.array([1,numpy.nan,2])
> >>> aa = numpy.ma.masked_where(numpy.isnan(a),a)
> >>> aa
> array(data =
> [ 1.e+00 1.e+20 2.e+00],
>mask =
> [False True False],
>fill_val
I noticed that the new masked array module resides in numpy/ma in the
maskedarray branch as opposed to numpy/core/ma like it does in the current
trunk. Was this intentional? Code that explicitly imports ma from the core
subfolder will break from this change (like the __init__.py script for the
eries package in the scipy SVN ? We (Matt Knox
> and I) tried to address some of these issues for environmental and financial
> time series.
> http://www.scipy.org/SciPyPackages/TimeSeries
>
I have just added a trailing max and trailing min function to the timeseries
package to g
I think it's reasonably safe to say at this point that most people are in
favor of the new maskedarray implementation becoming the default numpy.ma at
some point in the future. So the question is, when/how will the migration
process be done?
- just swap the whole thing as is and hope for the b
> I'm inclined to move his masked array over to ma wholesale. The fact
> that Pierre sees it as his baby is very important to me. If it doesn't
> have significant compatibility issues than I'm all for it. I'm mainly
> interested in hearing how people actually using numpy.ma would respond.
>
> I have a numpy record array and I want to pretty print a single
> element. I was trying to loop over the names in the element dtype and
> use getattr to access the field value, but I got fouled up because
> getattr is trying to access the dtype attribute of one of the python
> objects (datetime.
Andrew Straw astraw.com> writes:
>
> Bill Baxter wrote:
> > On 4/4/07, Robert Kern gmail.com> wrote:
> >
> >> Bill Baxter wrote:
> >>
> >>> Is there any place on the Wiki that lists all the known software that
> >>> uses Numpy in some way?
> >>>
> >>>
> It would be nice to s
Sturla Molden brought up a point in an earlier thread ("Please help with
subclassing numpy.ndarray") that I think is worth highlighting. A "common"
approach to subclassing ndarray in python (http://www.scipy.org/Subclasses)
results in code that is not thread safe. This approach involves setting
> Would this break previously saved pickles, so you couldn't load them? I ran
into
> that problem last year when there was a change to numpy. Is that something
that
> would happen here?
>
> bb
>
Regardless of whether or not this change will "break pickles", it seems hi
> Moving the implementation to the C-level also has its downside. To
> me, at least, Python code is much more readable and hence easier to
> maintain.
>
> Is there a way that we can implement only the speed-critical methods
> in C?
>
> Cheers
> Stéfan
>
Implementing the whole thing in C also h
> That time series module sounds very interesting! Is it available
> somewhere, or some documentation?
>
> Thank you,
> Sven
>
Not really any documentation yet, and the code is still in a state of flux, so
expect frequent changes/additions at this point still. No concern is being
given to "bac
> This makes sense to me. I'm generally favorable to the new maskedarray
> (I actually like the idea of it being a sub-class). I'm just waiting
> for people that actually use the MaskedArray to comment.
>
> For 1.1 I would really like to move most of the often-used sub-classes
> of the ndarr
> Are you sure about this? I ran this case using timeit, and the first one
> was 5 times or so *faster* than the second case. I just dug around and
> frompyfunc is acutally implemented in C, although it has to call back
> into python to execute the function being vectorized. Can you try using
>
> >>
> > You might want to look at frompyfunc:
> >
> > def expmave2(x, k):
> > def expmave_sub(a, b):
> > return a + k * (b - a)
> > return np.frompyfunc(expmave_sub, 2, 1).accumulate(x)
> >
> >
> > It's amazing what you find when you dig around.
>
> On Friday 05 of January 2007 17:42, Matt Knox wrote:
> > -
> > Example 1 - exponential moving average:
> >
> > # naive brute force method...
> > def expmave(x, k):
> > result = numpy.array(x, copy=T
---
Is their a good way to do these kinds of things without python looping? Or is
that going to require writing a ufunc in C? Any help is greatly appreciated.
Thanks,
- Matt Knox
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://p
all I can come up with is dumb brute force methods by iterating through all the
values. Anyone got any tricks I can use?
Thanks,
- Matt Knox
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo
34 matches
Mail list logo