Skip to content

Commit ae1e248

Browse files
author
izaid
committed
Updates to match libdynd
1 parent f017a86 commit ae1e248

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

dynd/cpp/types/base_fixed_dim_type.pxd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ from ..type cimport type
44

55
from ...config cimport translate_exception
66

7-
cdef extern from "dynd/types/base_fixed_dim_type.hpp" namespace "dynd":
8-
type dynd_make_fixed_dim_kind_type "dynd::ndt::base_fixed_dim_type::make" (type&) except +translate_exception
9-
type dynd_make_fixed_dim_kind_type "dynd::ndt::base_fixed_dim_type::make" (type&, intptr_t) except +translate_exception
7+
cdef extern from 'dynd/types/base_fixed_dim_type.hpp' namespace 'dynd::ndt':
8+
cppclass base_fixed_dim_type:
9+
pass

dynd/ndt/type.pyx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ from ..cpp.types.type_id cimport (type_id_t, uninitialized_id,
2525
type_id)
2626
from ..cpp.types.datashape_formatter cimport format_datashape as dynd_format_datashape
2727
# from ..cpp.types.categorical_type cimport dynd_make_categorical_type
28-
from ..cpp.types.base_fixed_dim_type cimport dynd_make_fixed_dim_kind_type
2928
from ..cpp.types.tuple_type cimport tuple_type
3029
from ..cpp.types.struct_type cimport struct_type
30+
from ..cpp.types.base_fixed_dim_type cimport base_fixed_dim_type
3131
from ..cpp.types.var_dim_type cimport var_dim_type as _var_dim_type
3232
from ..cpp.types.callable_type cimport callable_type as _callable_type
3333
from ..cpp.types.string_type cimport string_type
@@ -552,7 +552,7 @@ def make_struct(field_types, field_names):
552552
result.v = dynd_make_struct_type(field_types, field_names)
553553
return result
554554

555-
def make_fixed_dim_kind(element_tp, ndim=None):
555+
def make_fixed_dim_kind(element_tp):
556556
"""
557557
ndt.make_fixed_dim_kind(element_tp, ndim=1)
558558
Constructs an array dynd type with one or more symbolic fixed
@@ -574,10 +574,7 @@ def make_fixed_dim_kind(element_tp, ndim=None):
574574
ndt.type("Fixed * Fixed * Fixed * int32")
575575
"""
576576
cdef type result = type()
577-
if (ndim is None):
578-
result.v = dynd_make_fixed_dim_kind_type(type(element_tp).v)
579-
else:
580-
result.v = dynd_make_fixed_dim_kind_type(type(element_tp).v, int(ndim))
577+
result.v = make_type[base_fixed_dim_type](type(element_tp).v)
581578
return result
582579

583580

0 commit comments

Comments
 (0)