def post_init(self): """ Install conversion from optional(T) to T """ from numba.typeconv.rules import default_casting_rules as tcr tcr.safe(self, self.type) tcr.promote(self.type, self) tcr.promote(none, self)
def post_init(self): """ Install conversion from this layout (if non-'A') to 'A' layout. """ if self.layout != 'A': from numba.typeconv.rules import default_casting_rules as tcr ary_any = Array(self.dtype, self.ndim, 'A', const=self.const) # XXX This will make the types immortal tcr.safe(self, ary_any)
def post_init(self): """ Install conversion from this layout (if non-'A') to 'A' layout. """ if self.layout != 'A': from numba.typeconv.rules import default_casting_rules as tcr ary_any = self.copy(layout='A') # XXX This will make the types immortal tcr.safe(self, ary_any)