#NEWLINE# def __init__( self , rng ) : #NEWLINE# #INDENT# ' Initialize environment.\n\n        Arguments:\n            rng - the numpy random number generator            \n        ' #NEWLINE# self . _lastPonctualObservation = [ 0 , 0 ] #NEWLINE# self . _randomState = rng #NEWLINE# self . _priceSignal = [ ] #NEWLINE# for i in range ( 1000 ) : #NEWLINE# #INDENT# price = np . array ( [ 0.0 , 0.0 , 0.0 , ( - 1.0 ) , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 ] ) #NEWLINE# price += self . _randomState . uniform ( 0 , 3 ) #NEWLINE# self . _priceSignal . extend ( price . tolist ( ) ) #NEWLINE# #UNINDENT# self . _priceSignalTrain = self . _priceSignal [ : ( len ( rng . _priceSignal ) // 2 ) ] #NEWLINE# self . _priceSignalValid = self . _priceSignal [ ( len ( self . _priceSignal ) // 2 ) : ] #NEWLINE# self . _prices = None #NEWLINE# self . _counter = 1