Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MATLAB to Python conversion
#11
That's what I'm finding - lots of ways to store the data. Each way I have tried has limitations in data indexing.

With the MATLAB code I can index the number of workers in all files at once like filedata[:].numWorkers. I can access the locations of all trucks in a given file like filedata[1].truck[:].location - I haven't come across a way to do that in Python without n-dimensional arrays, and my problem is that the number of trucks or workers will change from shift to shift, requiring different sized vectors in each tier of the structure/class/whatever I set up. It may just be that it isn't possible to do this in Python the way I need to. I guess I could just create a large arrays to ensure my data will fit, and just store the size of each set of variables for bookkeeping (or search for non-NaN values).
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I need to add data types to cython conversion python to c Good_AI_User 1 1,009 Aug-19-2022, 07:52 AM
Last Post: Gribouillis
Photo Matlab to Python Sateesh 0 1,679 Nov-04-2020, 09:11 AM
Last Post: Sateesh
  From Matlab to Python erbab 1 2,019 Oct-27-2020, 02:16 PM
Last Post: jefsummers
  Arrays in MATLAB and PYTHON cokhuatlanyeuthuongconhetmuc 2 2,204 Jul-24-2020, 10:47 AM
Last Post: cokhuatlanyeuthuongconhetmuc
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 2 6,513 Jul-09-2020, 04:46 PM
Last Post: srikanth7482
  Matlab to Python -- Parallel Computing zistambo 1 1,971 Jun-10-2020, 04:59 PM
Last Post: pyzyx3qwerty
  C to Python code conversion print problem anakk1n 1 2,189 May-22-2020, 04:15 PM
Last Post: deanhystad
  Python uppercase conversion conditions Jaypeng 7 2,981 Apr-29-2020, 11:24 AM
Last Post: jefsummers
  Python v MatLab for graphs and plots CynthiaMoore 4 3,046 Apr-22-2020, 02:13 PM
Last Post: CynthiaMoore
  python equivalent to MATLAB xcov chai0404 2 3,881 Apr-02-2020, 10:29 PM
Last Post: chai0404

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020