Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JonTong
Copy link
Contributor

@JonTong JonTong commented Feb 23, 2019

No description provided.

@somada141
Copy link
Collaborator

@renefritze what do you think?

end = data.shape
if hasattr(data,'shape'):
end = data.shape
elif(data[0].ndim==3 and data[1].ndim==3 and data[2].ndim==3):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

been forever since I've looked at this code but doesn't this assume 3D vector arrays?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it does - I only thought about using it for 3D vector fields like velocity etc.

Would it be worth generalising it to higher dimensional vectors?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should support whatever the format supports but I've long passed the reigns to @renefritze so I'll let him decide

Copy link
Contributor

@renefritze renefritze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me. I think a generalization to N-d can still happen when someone needs it.

@renefritze
Copy link
Contributor

So the question is, @JonTong would you want to add the general case?

@JonTong
Copy link
Contributor Author

JonTong commented Feb 25, 2019

I'm happy to look at adding the general case in the near future.
To clarify, N-d vectors in 3D space rather than a full generalisation of both the number of components in the main vector (N) and the dimensional space of each component (m) (N component vectors in m-D space), right?

@renefritze
Copy link
Contributor

renefritze commented Feb 25, 2019

I'm happy to look at adding the general case in the near future.

Great!

To clarify, N-d vectors in 3D space rather than a full generalisation of both the number of components in the main vector (N) and the dimensional space of each component (m) (N component vectors in m-D space), right?

TBH, I can't really say, since I don't have a use case. Just do what's useful for you first I'd say.

@renefritze renefritze merged commit 7d36658 into pyscience-projects:master Feb 25, 2019
@somada141
Copy link
Collaborator

I reckon @renefritze is right, lets merge this in and should people want the generalised version we can revisit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants