예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)