I have the following dtype definition
pointDtype = np.dtype([('x', 'f4'),('y', 'f4'),('z', 'f4')])
pointNBtype = nb.from_dtype(pointDtype)
and the following function,
@njit(nb.bool_(pointNBtype, pointNBtype))
def equal(p0, p1):
return p0.x == p1.x and p0.y == p1.y and p0.z == p1.z
After I created the following,
p0 = np.array((1,2,0), dtype= pointNBtype)
p1 = np.array((0,0,0), dtype= pointNBtype)
I get the following error,
00 args = [self.typeof_pyval(a) for a in args]
701 msg = ("No matching definition for argument type(s) %s"
702 % ', '.join(map(str, args)))
--> 703 raise TypeError(msg)
TypeError: No matching definition for argument type(s) unaligned array(Record(x[type=float32;offset=0],y[type=float32;offset=4],z[type=float32...more stuff
This runs fine IF i do not specify the signature (ie. @njit
without any signature specs)