Search found 7 matches

by cwebster
Fri Nov 12, 2010 3:27 am UTC
Forum: Coding
Topic: Panda3d, blender or anything else for data visualization?
Replies: 5
Views: 2169

Re: Panda3d, blender or anything else for data visualization

You might look at Mayavi (http://code.enthought.com/projects/mayavi/). Open source, with Python scripting, built on top of VTK and numpy, with live updates to the visualization when data is changed. It will probably do what you need.
by cwebster
Thu Jun 24, 2010 12:59 am UTC
Forum: Coding
Topic: CSV Files in Python
Replies: 6
Views: 3312

Re: CSV Files in Python

That would indeed be the problem, but with the solution another arises. When I change the file format to csv, then it works. As long as there is only one row, that is. If there is a second row, I get this: Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> for row ...
by cwebster
Thu Jun 24, 2010 12:20 am UTC
Forum: Coding
Topic: CSV Files in Python
Replies: 6
Views: 3312

Re: CSV Files in Python

>>> test = csv.reader(open('Workbook1.xlsx')) I *know* it's something simple, but I don't know what. I think you're trying to open the Excel file, not the file you exported the csv data to. If you want to read Excel files directly, there is xlrd (http://pypi.python.org/pypi/xlrd).
by cwebster
Sat Jun 12, 2010 12:00 pm UTC
Forum: Coding
Topic: What is a good language for a scientist?
Replies: 19
Views: 2916

Re: What is a good language for a scientist?

I have yet to see python used in a non-cutesy way. Though, if this is truly a part time thing, then I agree that python looks like a better choice. However, I can't seriously recommend it for serious number crunching. I work for a scientific computing company and we work principally with Python as ...
by cwebster
Mon Feb 08, 2010 12:42 am UTC
Forum: Coding
Topic: I am having trouble plotting this equation. (Python)
Replies: 9
Views: 1617

Re: I am having trouble plotting this equation. (Python)

Whoa! Bravo, but a bit overkill for this application. If you have scipy installed, you can use import factorial from scipy.misc (i.e. "from scipy.misc import factorial"). Otherwise, if you think you'll want to use factorial to act on multiple elements, you can use numpy.vectorize. I'd sus...
by cwebster
Thu Feb 04, 2010 5:07 am UTC
Forum: Coding
Topic: Python + numpy: merging 2d arrays
Replies: 1
Views: 3025

Re: Python + numpy: merging 2d arrays

In Matlab, it would be trivially simple: if you store into a point that's beyond the dimensions of the array, it just pads the rest of it out with zeros. Any advice? My years of Matlab programming have taught me to avoid for loops whenever possible in interpreted languages (to be fair, I don't know...
by cwebster
Thu Feb 04, 2010 4:46 am UTC
Forum: Coding
Topic: Choosing a Database for Python coding
Replies: 7
Views: 2655

Re: Choosing a Database for Python coding

You might consider using a numpy array if you have numpy installed (and if you don't then you might want to install it if you're looking at problems like the one you describe). Numpy arrays have save() and load() methods for dumping out and loading back binary representations. You can even use struc...

Go to advanced search