write()

H

Hyun-su

Hi,
I have a file which is 3D data ([pixel_x, pixel_y, pixel_z])

I want to plot and write into other file as 1 dimension ([:, y_cut,
z_cut])

How can I do it?
 
U

Ulrich Eckhardt

Hyun-su said:
I have a file which is 3D data ([pixel_x, pixel_y, pixel_z])

I want to plot and write into other file as 1 dimension ([:, y_cut,
z_cut])

How can I do it?

I'd write a loop along these lines:

with open(outputfile, 'w') as o:
for pixel_x, pixel_y, pixel_z in input_data:
o.write(...)


If you want a better suggestion, I'd suggest that you provide more info.
Also, and that is very important, you should indicate which efforts you
already too. In particular, I'd suggest the introductory tutorial on Python
(see http://docs.python.org) and E.S. Raymonds essay on smart questions
(search the web for it). If you don't show effort, people will assume you
are lazy and just need someone to do your homework for you.

Good luck!

Uli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top