Skip to content
Snippets Groups Projects
Commit 14986080 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Change FieldShapeSymbol to only store a single field name

parent a6924b47
No related branches found
No related tags found
No related merge requests found
Pipeline #64467 failed
......@@ -151,9 +151,9 @@ class Field:
total_dimensions = spatial_dimensions + index_dimensions
if index_shape is None or len(index_shape) == 0:
shape = tuple([FieldShapeSymbol([field_name], i) for i in range(total_dimensions)])
shape = tuple([FieldShapeSymbol(field_name, i) for i in range(total_dimensions)])
else:
shape = tuple([FieldShapeSymbol([field_name], i) for i in range(spatial_dimensions)] + list(index_shape))
shape = tuple([FieldShapeSymbol(field_name, i) for i in range(spatial_dimensions)] + list(index_shape))
strides = tuple([FieldStrideSymbol(field_name, i) for i in range(total_dimensions)])
......
......@@ -106,7 +106,7 @@ class FieldStrideSymbol(TypedSymbol):
obj = FieldStrideSymbol.__xnew_cached_(cls, *args, **kwds)
return obj
def __new_stage2__(cls, field_name, coordinate):
def __new_stage2__(cls, field_name: str, coordinate: int):
from ..defaults import DEFAULTS
name = f"_stride_{field_name}_{coordinate}"
......@@ -139,7 +139,7 @@ class FieldShapeSymbol(TypedSymbol):
obj = FieldShapeSymbol.__xnew_cached_(cls, *args, **kwds)
return obj
def __new_stage2__(cls, field_names, coordinate):
def __new_stage2__(cls, field_name: str, coordinate: int):
from ..defaults import DEFAULTS
names = "_".join([field_name for field_name in field_names])
......@@ -147,7 +147,7 @@ class FieldShapeSymbol(TypedSymbol):
obj = super(FieldShapeSymbol, cls).__xnew__(
cls, name, DEFAULTS.index_dtype, positive=True
)
obj.field_names = tuple(field_names)
obj.field_name = field_name
obj.coordinate = coordinate
return obj
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment