LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2010, 10:31 AM   #1
disruptive
Member
 
Registered: Dec 2005
Posts: 76

Rep: Reputation: 15
Multi dimensional > 3 array in Python


Hi

I do a lot of scientific work - mainly in C/C++ but want to do some of the calcs in python, however I am finding it a problem with the lack of dimensionality. I frquency have a list of n particles and a multi-dim array for each particle and want to be able to access directly any component with ease. How best to go about this...

ideally:

my prop = [n][x][y][z]


I might need a particular value and then to update that...I do not want to have to deal with lists etc etc as this feels rather cumbersome, adding, removing etc. There must be an easy way....
 
Old 07-28-2010, 11:09 AM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
I do a lot of scientific work - mainly in C/C++ but want to do some of the calcs in python
NumPy is the fundamental package needed for scientific computing with Python.
 
Old 07-28-2010, 12:24 PM   #3
robotsari
LQ Newbie
 
Registered: Jun 2010
Location: boston & sf bay, depending on the day
Distribution: ubuntu, rhel, debian
Posts: 20

Rep: Reputation: 1
Yes, NumPy is definitely what you want. Look at the array functions listed here.

Also try googling for "numpy array tutorial". I used to do work for a biology lab and found this tutorial to be useful.

Ask more questions if need be. I hope that helps a bit more.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php Sort a Multi Dimensional Array action_owl Programming 3 04-30-2010 03:04 PM
Two dimensional array som_kurian Programming 2 01-01-2008 03:27 AM
two dimensional array sorting in C/C++ George2 Programming 10 11-19-2006 08:29 PM
Bash 2 dimensional array ldp Linux - General 5 07-29-2005 11:29 AM
3 dimensional array help leeach Programming 11 06-15-2005 10:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration