Skip to content

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

Description

@philipc2

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

new featureNew user-facing functionality

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions