#NEWLINE# def __call__( self , key , value ) : #NEWLINE# #INDENT# key = key . lstrip ( '/' ) #NEWLINE# dataset = self . npz [ ( self . path + key ) ] #NEWLINE# if isinstance ( value , numpy . ndarray ) : #NEWLINE# #INDENT# numpy . copyto ( value , dataset ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , cuda . ndarray ) : #NEWLINE# #INDENT# value . set ( numpy . asarray ( dataset ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = type ( value ) ( numpy . asarray ( dataset ) ) #NEWLINE# #UNINDENT# #UNINDENT# return value