-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
69 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
import ctypes | ||
import numpy as np | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
import ctypes | ||
import numpy as np | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
|
||
class fParam: | ||
def __init__(self, obj): | ||
self.obj = obj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import ctypes | ||
|
||
from .fVar_t import fVar_t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import ctypes | ||
|
||
from .fVar_t import fVar_t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import ctypes | ||
import numpy as np | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import operator | ||
|
||
default_ops = { | ||
'UPLUS': operator.__add__, | ||
'UMINUS': operator.__sub__, | ||
'PLUS': operator.__add__, | ||
'MINUS': operator.__sub__, | ||
'TIMES': operator.__mul__, | ||
'DIVIDE': operator.__truediv__, | ||
'POWER': operator.__pow__, | ||
'CONCAT': operator.__add__, # Only for strings | ||
'AND': operator.__and__, | ||
'OR': operator.__or__, | ||
'EQV': operator.__eq__, | ||
'NEQV': operator.__ne__, | ||
'EQ_SIGN': operator.__eq__, | ||
'EQ': operator.__eq__, | ||
'NE_SIGN': operator.__ne__, | ||
'NE': operator.__ne__, | ||
'GT_SIGN': operator.__gt__, | ||
'GT' : operator.__gt__, | ||
'GE_SIGN': operator.__ge__, | ||
'GE': operator.__ge__, | ||
'LT_SIGN': operator.__le__, | ||
'LT': operator.__le__, | ||
'LE_SIGN': operator.__le__, | ||
'LE': operator.__le__, | ||
'NOT': operator.__not__, | ||
'PARENTHESES': None, | ||
'USER': None, | ||
'NULL': None, | ||
"UPLUS": operator.__add__, | ||
"UMINUS": operator.__sub__, | ||
"PLUS": operator.__add__, | ||
"MINUS": operator.__sub__, | ||
"TIMES": operator.__mul__, | ||
"DIVIDE": operator.__truediv__, | ||
"POWER": operator.__pow__, | ||
"CONCAT": operator.__add__, # Only for strings | ||
"AND": operator.__and__, | ||
"OR": operator.__or__, | ||
"EQV": operator.__eq__, | ||
"NEQV": operator.__ne__, | ||
"EQ_SIGN": operator.__eq__, | ||
"EQ": operator.__eq__, | ||
"NE_SIGN": operator.__ne__, | ||
"NE": operator.__ne__, | ||
"GT_SIGN": operator.__gt__, | ||
"GT": operator.__gt__, | ||
"GE_SIGN": operator.__ge__, | ||
"GE": operator.__ge__, | ||
"LT_SIGN": operator.__le__, | ||
"LT": operator.__le__, | ||
"LE_SIGN": operator.__le__, | ||
"LE": operator.__le__, | ||
"NOT": operator.__not__, | ||
"PARENTHESES": None, | ||
"USER": None, | ||
"NULL": None, | ||
} | ||
|
||
|
||
def run_unary(unary, x, y, *, ops=default_ops) : | ||
def run_unary(unary, x, y, *, ops=default_ops): | ||
op = ops[unary] | ||
|
||
if op is None: | ||
raise NotImplementedError(f"Unary op {unary} not implemented") | ||
|
||
return op(x,y) | ||
|
||
return op(x, y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import ctypes | ||
import collections | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import ctypes | ||
import itertools | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
try: | ||
from importlib import metadata | ||
except ImportError: # for Python<3.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
|
||
import subprocess | ||
import pytest | ||
import _pytest.skipping | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters