Hello,
what are the differences between the two transformation functions
frompyfunc & vectorize
* http://docs.scipy.org/doc/numpy/reference/generated/numpy.vectorize.html
* http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html
I cannot see the which one I shall prefer for what
>> Is this worth to go into the official docs?
>> The page http://docs.scipy.org/doc/numpy/user/basics.rec.html is quite
>> sparse...
>>
>> I still wonder why there is not a quick function for such a view /
>> reshape conversion.
>
>
> Thanks, the docs for working with arrays with structured dtyp
josef.p...@gmail.com schrieb:
> On Mon, Mar 8, 2010 at 5:50 PM, Tim Michelsen
> wrote:
>> Hello,
>> thanks to all who responded and have their input here.
>>
>> I added a little code snippet to show the view and reshape:
>>
>> http://www.scipy.org/Cookbo
>> I still wonder why there is not a quick function for such a view /
>> reshape conversion.
>
> Because it is difficult (impossible?) to do in the general case. .view()
> really isn't that bad, in fact, it remarkably powerful and flexible!
I would not drop .view() but rather add a convenience fu
Hello,
thanks to all who responded and have their input here.
I added a little code snippet to show the view and reshape:
http://www.scipy.org/Cookbook/Recarray
What do you think?
Is this worth to go into the official docs?
The page http://docs.scipy.org/doc/numpy/user/basics.rec.html is quite
s
Hello,
I am also looking into the convertsion from strcutured arrays to ndarray.
> I've just started playing with numpy and have noticed that when printing
> a structured array that the output is not nicely formatted. Is there a
> way to make the formatting look the same as it does for an unstruct
Hello,
I experienced the following issue with numpy 1.4:
scipy.stats:
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
import scipy.stats as st
Traceback (most recent call last):
File "", line 1, in
File "C:\Python26\lib\site-packages\scipy\stats\__init
>> And another question I import this file to excel, is there also a
>> possiblity to create a headline for each column, that the file looks
>> like the following example:
>>
>> average; standard deviation; maximum distance; sum of distances
>> 0,26565; 0,65565; 2,353535; 25, 5656
I was fid
FYI:
Here is a summary of how one can
1) write numpy arrays to Excel
2) interact with numpy/scipy/... from Excel
http://groups.google.com/group/python-excel/msg/3881b7e7ae210cc7
Best regards,
Timmie
___
NumPy-Discussion mailing list
NumPy-Discussion@
> My bad, sorry. I already always forget to check tickets on the trac
> site for numpy/scipy, adding yet another site to check seems to be way
> too much for my caffeine-affected memory. However, there should be an
> option to allocate tickets to specific people, right ? And then I
> should
> It already exists in the docs:
> http://docs.scipy.org/numpy/docs/numpy.lib.io.genfromtxt/
> Did you mean you tried to edit this page?
But cannot be found in here:
http://docs.scipy.org/doc/numpy/reference/routines.io.html
So it just needs to be added in
http://docs.scipy.org/doc/numpy/_source
> I actually figured out a workaround with converters, since my missing
> values are " "," "," " ie., irregular number of spaces and the
> values aren't stripped of white spaces. I just define {# : lambda s:
> float(s.strip() or 0)}, and I have a loop build all of the converters,
> but then I h
> Check the archives of the mailing list, there's an example using
> dateutil.parser that may be just what you need.
How is this dateutil.parser used in timeseries?
Can it not be used to make the dateconverter obsolte for the most simple
cases?
___
Nu
> I just wanted to point out that there is an easy way of making a
> difference, and making sure that the docstrings get fixed (which is
> indeed very important). If you go to http://docs.scipy.org/ and register,
> send your login name on this mailing list, we will add you to the list of
> editors,
>> Again, would a function for the
>> "empirical inverse survival function" qualify for the
>> inclusion into numpy or scipy?
>
> Sorry, I'm too distracted, correcting myself a second time
> "this should *not* have inverse in it, using inverse was a cut and paste
> error"
> it's empirical survi
> My first stop is usually wikipedia:
[...]
Thanks.
So I I'known that I have to call the beast a
"empirical inverse survival function", Robert would
also have foundit easier to help.
Anyway, step by step...
> In the case of the weight of pigs, it would be to cumulative weight of
> all pigs with
>
Hello,
I have checked the snippets you proposed.
It does what I wanted to achieve.
Obviously, I had to substract the values as Robert
demonstrated. This could also be perceived from
the figure I posted.
I still have see how I can optimise the code
(c.f. below) or modify to be less complicated
> >>> Okay. That is completely different from what you've asked before.
> > You are right.
> > But it's soemtimes hard to decribe a desired and expected output in
> > python terms and pseudocode.
> > I still have to lern more numpy vocabs...
>
> Actually, I apologize. I meant to delete that line b
Hello Robert and Josef,
thanks for the quick answers! I really appreciate this.
>>> I am trying to create a inverse cumulative histogram [3] which shall
>>> look like [4] but with the higher values at the left.
>> Okay. That is completely different from what you've asked before.
You are right.
But
Hello fellow numy users,
I posted some questions on histograms recently [1, 2] but still couldn't
find a solution.
I am trying to create a inverse cumulative histogram [3] which shall
look like [4] but with the higher values at the left.
The classification shall follow this exemplary rule:
cl
Hello,
should creating a histogram with masked data be different that one cretated with
unmasked data?
Is np.hist tuned for work with historams?
I R_project I would do:
# Note: values is my dataset
### masking zeros
values_mask=ifelse(values==0, NA, (values))
# http://stat.ethz.ch/R-manual/R-pa
> But I completely agree with you, genfromtxt could print out
> the line number and the actual line giving problems.
Here we go:
http://projects.scipy.org/numpy/ticket/1212
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scip
> $ awk -F '|' '{if(NF != 12) print NR;}' /tmp/pp.txt
> and besides the first 23 lines and the last 3 lines of the file,
> also the following have a number of '|' different from 11:
> 1635
> 2851
> 5538
> i.e. BIKIN, BENGUERIR and TERESINA AIRPORT.
Looks lika some bash magic.
I will try to transla
> Mmh, perhaps.
Thanks for the quick reply.
> I'll try to see what I can do. Usually, this message
> shows up when one of the lines you have read doesn't have the same
> number of columns as the others.
Could we add this error to the docstring?
As I suggested, It would be helpful to get the l
Hello,
I tried to load a ASCII table into a string array. Unfortunately, this table has
some empty chells
Here it is:
http://www.ncdc.noaa.gov/oa/climate/rcsg/cdrom/ismcs/alphanum.html
After having converted this into a text file I tried this:
$ np.genfromtxt('alphanum_to-text.txt', dtype=np.str
> Tim, do you mean, that you want to apply other functions, e.g. mean or
> variance, to the original values but calculated per bin?
Sorry that I forgot to add this. Shame.
I would like to apply these mathematical functions on the original values
stacked in the respective bins.
For instance:
The
Hello,
I need some advice on histograms.
If I interpret the documentation [1, 2] for numpy.histogram correctly, the
result of the function is a count of the occurences sorted into each bin.
(n, bins) = numpy.histogram(v, bins=50, normed=1)
But how can I apply another function on these values stac
> http://bibdesk.sourceforge.net/
I use JabRef for quite some time. Very nice and cross-platform. Good
interoperability with LyX.
If you
with MS or OOo, you'd go for Bibus.
Best regards,
Timmie
___
Numpy-discussion mailing list
Numpy-discussion@scipy.
to mention that I could not register the 1.3.0 release on pypi,
> as I don't have rights to the numpy project. The release is tagged, so
> it is just a matter of running python setup.py register for anyone with
> corresponding privileges on pypi's numpy project,
Sorry, I should have read here first
Hello William,
once again.
I just noticed that Resolver One can only import data from Excel.
In science, the common low level data exchange format is ASCII text
like: CSV or tab separated.
You may consider adding this.
I did not find any installation instructions contained in the docs for
the
Hello William,
> * A few performance improvements.
> * Over 900 NumPy tests now pass: in fact, almost all the tests from the
> core, fft, lib, linalg, ma, oldnumeric and random subpackages.
I have some questions here for the science interested. I hope that they
are not too specific:
* Can you a
Hello Allan, Stefan and others,
did you already come to a conclusion regarding this cite topic?
Did you try to run the bibtext extension for Sphinx?
If so, please update the documentation guidelines.
Regards,
Timmie
___
Numpy-discussion mailing list
N
Hello,
last year there has been a discussion on this on the OSGEO list about
the same issue.
You may check oggeo.discuss at Gmane or Nabble for it.
Kind regards,
Timmie
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy
> If I understand, you are using bib4txt.py to do this?
Yes, I use bib4txt.py.
The extension just runs bib4txt.py over all documents to extract the
citations. Then it creates the reference file.
The bibtex file is also converted to ReSt using your tools.
But since the bibstuff needs the citation
Hello,
I really like the discussion here.
> Originally I was just pointing out a problem.
> Proposing a good solution requires some discussion.
> The problem has also changed because of a suggestion
> that the docs should be usable for book compilation,
> and I am very uncertain how that is conce
>> I want to apply a function (myfunc which takes and returns a scalar) to each
>> element in a multi-dimensioned array (data):
>>
>> I can do this:
>>
>> newdata = numpy.array([myfunc(d) for d in data.flat]).reshape(data.shape)
>>
>> But I'm wondering if there's a faster more numpy way. I've looke
> A new copy of the reference guide is now available at
>
> http://mentat.za.net/numpy/refguide/
Very nice.
Will this be included in the main numpy distribution upon completion?
Thanks and appreciation for efforts.
Kind regards,
Timmie
___
Numpy-disc
Hello,
sometime scripts and programs create a lot of data output.
For the programmer and also others not involved in the scripting but in the
evaluation of the output it would be very nice the output files could be
prepended with a file header describing what is written in the columns below and
to
Hello,
due to fixed release cycles Ubuntu 8.04 still lacks the latest numpy 1.1.
I succeeded backporting the package python-numpy from the upcoming
release Intrepid 8.10 with the help of the automatic tool Prevu.
Instructions can be found here:
* https://wiki.ubuntu.com/Prevu
* http://ubuntuforu
Hello,
how do I remove all rows (or column) from an array which contain a
certain value or sting?
some like:
array.delte_row_from_array_wich_contains('March')
array.delte_row_from_array_wich_contains(-333)
Is there also possibility to replace all occurences of a certain value
in a array by n
> This looks like something that need to go on a list for numpy 1.2. Can you
post a list of the specific problems that need to be addressed?Chuck
Maybe this post can give some hints:
All Things Pythonic
Python 3000 and You
by Guido van Rossum
March 17, 2008
Summary
I've posted the slides f
Hello,
I registered the Scipy and Numpy mailing lists at the Nabble Web Forums:
Scipy
http://www.nabble.com/Scipy-User-f33045.html
Numpy
http://www.nabble.com/Numpy-discussion-f33046.html
I still have to import the old emails from the archives.
Kind regards and happy communicating,
Tim
Hello!
How can I load a data file (e.g. CSV, DAT) in ASCII which has some gaps?
The file has been saved with from a spreadsheet program which leaves
cells with not data empty:
1,23.
2,13.
3,
4,34.
Would this code be correct:
### test_loadtxt.py ###
import numpy
import maskedarray
# load data
> To learn array basics:
> http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/python/arrays.html>
> http://www.scipy.org/Numpy_Example_List#head-a8a8874581c2ebfc69a37ab513974a229ff3bfaa>
> http://www.scipy.org/Numpy_Example_List#head-a261b8dd10bda6a5fc268fe4f4171acee2f83968>
> ht
44 matches
Mail list logo