Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Class Methods for Grid Construction (i.e. Grid.from_verticies()) #378

Closed
philipc2 opened this issue Jul 14, 2023 · 0 comments · Fixed by #395
Closed

Use Class Methods for Grid Construction (i.e. Grid.from_verticies()) #378

philipc2 opened this issue Jul 14, 2023 · 0 comments · Fixed by #395
Assignees
Labels
new feature New feature or request
Milestone

Comments

@philipc2
Copy link
Member

Originally commented by @dcherian in #19

Here are a few suggestions

uxarray.Grid.init(self, string file)
(*) uxarray.Grid.init(self, string gridspec)
uxarray.Grid.init(self, np.float64.list vertices)
How about making the last two classmethods instead to avoid overloading init

grid = uxarray.Grid.from_gridspec(...),
grid = uxarray.Grid.from_vertices(...)
Even Grid.from_file looks nice to me but if that's the most common usecase, perhaps Grid.init(self, file) would be most convenient.

@philipc2 philipc2 added the new feature New feature or request label Jul 14, 2023
@philipc2 philipc2 mentioned this issue Jul 14, 2023
@philipc2 philipc2 self-assigned this Jul 14, 2023
@philipc2 philipc2 mentioned this issue Jul 17, 2023
3 tasks
@philipc2 philipc2 moved this to 📝 To Do in UXarray Development Jul 18, 2023
@philipc2 philipc2 moved this from 📝 To Do to 🏗 In progress in UXarray Development Aug 22, 2023
@erogluorhan erogluorhan added this to the Core - Grid milestone Sep 12, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in UXarray Development Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
Status: ✅ Done
2 participants