You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added a bunch more exercises to the custom type, + pytest
much of the functions I added were me trying to get Python to crash in a specific way. I failed, which is a good thing, because it means that EigenPy doesn't have the bug I thought it does.
BUT. EigenPy *does* have two issues exercised in the unit tests for the custom type, issues stack-of-tasks#519 and stack-of-tasks#520 . Additionally, this code exercises issue stack-of-tasks#521 , where I try to compute vector norms in two different ways and fail.
Additionally, I bumped the C++ standard to C++14, since Boost 1.87 didn't work correctly with only C++11, and 1.87 is now distributed by homebrew (I develop on a Mac)
A=np.zeros( (3),dtype=num_type) # make an array of the custom numeric type
141
+
assert(A[0] ==num_type(0))
142
+
143
+
returnA
8
144
9
-
deftry_things(num_type):
10
145
11
-
print(f'testing {num_type}')
146
+
defexpected_to_crash(num_type):
147
+
print("the following calls are expected to crash, not because they should, but because for whatever reason, eigenpy does not let us directly make numpy arrays WITHOUT converting")
148
+
make_empty_without_conversion(num_type)
149
+
make_zeros_without_conversion(num_type)
12
150
13
-
x=num_type(2) # the number 2, in variable precision as a complex number
0 commit comments