Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions privates/named_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ def items(cls):
@classmethod
def create(cls, **kwargs):
jit_cls = cls._gen_type()
args = []
for k, v in cls.items():
args.append(kwargs[k])
args = (kwargs[k] for k, _ in cls.items())
return jit_cls(*args)

Expand Down
5 changes: 1 addition & 4 deletions tests/named_struct/test_numba.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@

import numba
from numba.types import float64
import numpy as np

from privates import NamedStruct

FAIL_MSG = "Numba not found"


class Point(NamedStruct):
x: float64
Expand Down Expand Up @@ -37,7 +34,7 @@ def test_create_api():
assert norm.y == 1
assert norm[1] == 1
assert norm.height == 5
# assert norm[2] == 5 # TODO : need Struct.init
# assert norm[2] == 5 # TODO : needs Struct.init
assert norm.width == 6
# assert norm[3] == 6
assert norm.distance_from_origin() == 1
Expand Down
1 change: 0 additions & 1 deletion tests/named_struct/test_numba_inheritance.py

This file was deleted.