コード例 #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)