Commit 55e2b4b0 authored by Ivan Tyagov's avatar Ivan Tyagov

Cleanup empty spaces. XML update.

parent 1e0f209e
Pipeline #25791 failed with stage
...@@ -12,7 +12,7 @@ import string ...@@ -12,7 +12,7 @@ import string
def getRandomString(): def getRandomString():
return 'test_%s' %''.join([random.choice(string.ascii_letters + string.digits) \ return 'test_%s' %''.join([random.choice(string.ascii_letters + string.digits) \
for n in xrange(32)]) for n in xrange(32)])
# Game of Life examples # Game of Life examples
default_input_ndarray = np.array([[0,0,0,0,0,0], default_input_ndarray = np.array([[0,0,0,0,0,0],
[0,0,0,1,0,0], [0,0,0,1,0,0],
...@@ -46,7 +46,7 @@ def game_of_life_out_of_core(self): ...@@ -46,7 +46,7 @@ def game_of_life_out_of_core(self):
reference = array_reference, reference = array_reference,
version = '001') version = '001')
data_array.initArray((6,6), uint8) data_array.initArray((6,6), uint8)
life_area = data_array.getArray()[:,:] # ZBigArray -> ndarray view of it life_area = data_array.getArray()[:,:] # ZBigArray -> ndarray view of it
# change the data, exactly as if working with numpy.ndarray but # change the data, exactly as if working with numpy.ndarray but
...@@ -55,10 +55,10 @@ def game_of_life_out_of_core(self): ...@@ -55,10 +55,10 @@ def game_of_life_out_of_core(self):
transaction.commit() transaction.commit()
print_list.append(str(life_area)) print_list.append(str(life_area))
for i in range(4): for i in range(4):
iterate_2(life_area) iterate_2(life_area)
print_list.append(str(life_area)) print_list.append(str(life_area))
return '\n\n'.join(print_list) return '\n\n'.join(print_list)
def ERP5Site_gameOfLife(self, array_reference): def ERP5Site_gameOfLife(self, array_reference):
...@@ -69,14 +69,14 @@ def ERP5Site_gameOfLife(self, array_reference): ...@@ -69,14 +69,14 @@ def ERP5Site_gameOfLife(self, array_reference):
portal_type = 'Data Array', portal_type = 'Data Array',
reference = array_reference) reference = array_reference)
life_area = data_array.getArray()[:,:] # ZBigArray -> ndarray view of it life_area = data_array.getArray()[:,:] # ZBigArray -> ndarray view of it
# we make a copy, with big volumes maybe not wise # we make a copy, with big volumes maybe not wise
input_life_area = np.copy(life_area) input_life_area = np.copy(life_area)
# do real calculation on ndarray # do real calculation on ndarray
iterate_2(life_area) iterate_2(life_area)
self.log(str(life_area)) self.log(str(life_area))
if not (input_life_area==life_area).all(): if not (input_life_area==life_area).all():
# input array not equals output array, in this case we can continue # input array not equals output array, in this case we can continue
# until we find a solution or an end stage # until we find a solution or an end stage
...@@ -97,10 +97,10 @@ def game_of_life_out_of_core_activities(self): ...@@ -97,10 +97,10 @@ def game_of_life_out_of_core_activities(self):
data_array.initArray((6,6), uint8) data_array.initArray((6,6), uint8)
life_area = data_array.getArray()[:,:] # ZBigArray -> ndarray view of it life_area = data_array.getArray()[:,:] # ZBigArray -> ndarray view of it
# initialise # initialise
life_area[:,:] = default_input_ndarray life_area[:,:] = default_input_ndarray
transaction.commit() transaction.commit()
# start calculation in background using activities # start calculation in background using activities
...@@ -117,12 +117,12 @@ def game_of_life(self): ...@@ -117,12 +117,12 @@ def game_of_life(self):
Z = default_input_ndarray Z = default_input_ndarray
print_list.append(str(Z)) print_list.append(str(Z))
for i in range(4): for i in range(4):
iterate_2(Z) iterate_2(Z)
print_list.append(str(Z)) print_list.append(str(Z))
return '\n\n'.join(print_list) return '\n\n'.join(print_list)
def DataArray_calculateArraySliceAverageAndStore(self, start, end): def DataArray_calculateArraySliceAverageAndStore(self, start, end):
""" """
Compute average on a data array slice and store result on an Active Process. Compute average on a data array slice and store result on an Active Process.
......
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>WendelinExamples</string> </value> <value> <string>WendelinExamples</string> </value>
...@@ -59,28 +53,13 @@ ...@@ -59,28 +53,13 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -93,7 +72,7 @@ ...@@ -93,7 +72,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -102,26 +81,30 @@ ...@@ -102,26 +81,30 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
<pickle> <pickle>
<tuple> <dictionary>
<none/> <item>
<list> <key> <string>_log</string> </key>
<dictionary> <value>
<item> <list>
<key> <string>action</string> </key> <dictionary>
<value> <string>validate</string> </value> <item>
</item> <key> <string>action</string> </key>
<item> <value> <string>validate</string> </value>
<key> <string>validation_state</string> </key> </item>
<value> <string>validated</string> </value> <item>
</item> <key> <string>validation_state</string> </key>
</dictionary> <value> <string>validated</string> </value>
</list> </item>
</tuple> </dictionary>
</list>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
</ZopeData> </ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment