def descr__new__unicode_box(space, w_subtype, w_arg): from pypy.module.micronumpy.interp_dtype import new_unicode_dtype arg = space.unicode_w(unicode_from_object(space, w_arg)) # XXX size computations, we need tests anyway arr = VoidBoxStorage(len(arg), new_unicode_dtype(space, len(arg))) # XXX not this way, we need store #for i in range(len(arg)): # arr.storage[i] = arg[i] return W_UnicodeBox(arr, 0, arr.dtype)
def descr__new__unicode_box(space, w_subtype, w_arg): from pypy.module.micronumpy.interp_numarray import W_NDimArray from pypy.module.micronumpy.interp_dtype import new_unicode_dtype arg = space.unicode_w(unicode_from_object(space, w_arg)) arr = W_NDimArray([1], new_unicode_dtype(space, len(arg))) # XXX not this way, we need store #for i in range(len(arg)): # arr.storage[i] = arg[i] return W_UnicodeBox(arr, 0, arr.dtype)
def descr__new__unicode_box(space, w_subtype, w_arg): from pypy.module.micronumpy.interp_numarray import W_NDimArray from pypy.module.micronumpy.interp_dtype import new_unicode_dtype arg = space.unicode_w(unicode_from_object(space, w_arg)) arr = W_NDimArray([1], new_unicode_dtype(space, len(arg))) # XXX not this way, we need store # for i in range(len(arg)): # arr.storage[i] = arg[i] return W_UnicodeBox(arr, 0, arr.dtype)
def descr__new__unicode_box(space, w_subtype, w_arg): raise OperationError(space.w_NotImplementedError, space.wrap("Unicode is not supported yet")) from pypy.module.micronumpy.interp_dtype import new_unicode_dtype arg = space.unicode_w(unicode_from_object(space, w_arg)) # XXX size computations, we need tests anyway arr = VoidBoxStorage(len(arg), new_unicode_dtype(space, len(arg))) # XXX not this way, we need store #for i in range(len(arg)): # arr.storage[i] = arg[i] return W_UnicodeBox(arr, 0, arr.dtype)
def descr__new__unicode_box(space, w_subtype, w_arg): raise OperationError(space.w_NotImplementedError, space.wrap("Unicode is not supported yet")) from pypy.module.micronumpy.interp_dtype import new_unicode_dtype arg = space.unicode_w(unicode_from_object(space, w_arg)) # XXX size computations, we need tests anyway arr = VoidBoxStorage(len(arg), new_unicode_dtype(space, len(arg))) # XXX not this way, we need store #for i in range(len(arg)): # arr.storage[i] = arg[i] return W_UnicodeBox(arr, 0, arr.dtype)