Commit 9991b5a6 authored by Douglas's avatar Douglas

Old things removed from test server code

parent 1bf23c12
...@@ -108,20 +108,16 @@ def get_field_names_and_schema(): ...@@ -108,20 +108,16 @@ def get_field_names_and_schema():
np.dtype, np.dtype,
['i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', ['i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8', 'i8',
'i8', 'i8', 'i8', 'f8', 'i8', 'i8', 'f8', 'f8', 'f8', 'i8', 'i8', 'i8', 'f8', 'i8', 'i8', 'f8', 'f8', 'f8',
# 'a50', 'a50', 'a50', 'a50'] 'a50', 'a50', 'a50', 'a50']
'f8', 'f8', 'f8', 'f8']
) )
}) })
return field_names, array_schema return field_names, array_schema
def create_zbigarray(memory_size=None, dtype=None): def create_zbigarray(memory_size=None, dtype=None):
'''Create a ZBigArray with memory_size bytes with the defined dtype.''' '''Create a ZBigArray with memory_size bytes with the defined dtype.'''
# if memory_size and dtype:
element_number = memory_size // dtype.itemsize element_number = memory_size // dtype.itemsize
return ZBigArray((element_number,), dtype) return ZBigArray((element_number,), dtype)
# else:
# raise Exception('You need to provide memory_size and dtype, %s - %s' % (memory_size, dtype))
def set_zblock_format(zblk_format): def set_zblock_format(zblk_format):
'''Set the array to write with the provide zblock format. '''Set the array to write with the provide zblock format.
Formats are: Formats are:
...@@ -171,7 +167,7 @@ def populate_array(root, big_array, big_index, schema): ...@@ -171,7 +167,7 @@ def populate_array(root, big_array, big_index, schema):
transaction.commit() transaction.commit()
return {'messages': message_list, 'columns': columns} return {'messages': message_list, 'columns': columns}
def filter_item(item, normalize=True): def filter_item(item, normalize=False):
'''Typecast item to numeric values if it is a: DateTime or falsy to help '''Typecast item to numeric values if it is a: DateTime or falsy to help
pandas/numpy deal with them. If normalize is True it will typecast strings pandas/numpy deal with them. If normalize is True it will typecast strings
and unicodes to floats too, thus reducing that size dramatically. and unicodes to floats too, thus reducing that size dramatically.
......
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