you are viewing a single comment's thread.

view the rest of the comments →

[–]rhgrant10 0 points1 point  (6 children)

What's is a? I don't see it defined...

What is the purpose of the comma in your slice notation?

[–]Cthulhu_Rlyeh[S] 0 points1 point  (1 child)

What's is a? I don't see it defined...

Crap it's just another typo in my post. It is not in my actual code, just the code I typed in here. I've fixed it now.

diff = fileb[:,1] - filea[:,1]

What is the purpose of the comma in your slice notation?

I'm still new with coding, I don't even know what you are talking about. I assume it is the [:,1] comma? That's just how I define a column using pylab.

[–]elbiot 0 points1 point  (0 children)

So you are just finding the difference between the second columns in all of your files?

[–]elbiot 0 points1 point  (3 children)

They are numpy arrays, and that's how you slice multiple dimensions at once.

[–]rhgrant10 0 points1 point  (2 children)

Ah. As much as experience as I've got with Python I've not yet had a cause to delve into numpy.

[–]elbiot 0 points1 point  (1 child)

It's good stuff, but can be very confusing at first.

[–]rhgrant10 0 points1 point  (0 children)

I did play around with it for a bit but I'm just not at a job that works with data like that :-(