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
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 3 8,261 Oct-01-2024, 03:32 PM
Last Post: Alex_Kirpichny
  Media Pipe Python Interfacing with MATLAB cmcreecc 1 937 May-30-2024, 07:23 AM
Last Post: TrentErnser
  I need to add data types to cython conversion python to c Good_AI_User 1 1,746 Aug-19-2022, 07:52 AM
Last Post: Gribouillis
Photo Matlab to Python Sateesh 0 2,121 Nov-04-2020, 09:11 AM
Last Post: Sateesh
  From Matlab to Python erbab 1 2,655 Oct-27-2020, 02:16 PM
Last Post: jefsummers
  Arrays in MATLAB and PYTHON cokhuatlanyeuthuongconhetmuc 2 2,941 Jul-24-2020, 10:47 AM
Last Post: cokhuatlanyeuthuongconhetmuc
  Matlab to Python -- Parallel Computing zistambo 1 2,770 Jun-10-2020, 04:59 PM
Last Post: pyzyx3qwerty
  C to Python code conversion print problem anakk1n 1 2,749 May-22-2020, 04:15 PM
Last Post: deanhystad
  Python uppercase conversion conditions Jaypeng 7 4,876 Apr-29-2020, 11:24 AM
Last Post: jefsummers
  Python v MatLab for graphs and plots CynthiaMoore 4 4,288 Apr-22-2020, 02:13 PM
Last Post: CynthiaMoore

Forum Jump:

User Panel Messages

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