Commit d8c6a549 authored by constantin.hoeing's avatar constantin.hoeing
Browse files

Upload New File

parent ca1b2da2
written on < Date > by
Constantin Höing
Inst. Fuer Numerische und Angewandte Mathematik
Universität Göttingen
Description: Saves data in .npz and nd creates a companion .info file
with information about the size and class of the data
Input: data: array of numpy matrices OR a dictionary {"name of array": numpy_array}
filename: path to file in which the data should be saved
info: ????????????????????????????????
Output: filename.npz : a zip file containing the data
Usage: < var name = func_name( , , ) """
from numpy import savez
def Wbin(data, filename, info):
if isinstance(data, list):
savez(filename, *data)
f = open(filename + ".info", "w")
if isinstance(data, dict):
savez(filename, **data)
\ No newline at end of file
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