Skip to content

Commit

Permalink
[NF] Added "is_multiple" key to Data1D to account for multiple Data (…
Browse files Browse the repository at this point in the history
…e.g. phases of current)
  • Loading branch information
helene-t committed May 12, 2020
1 parent 47c3fb5 commit 109e7d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions SciDataTool/Classes/Data1D.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# -*- coding: utf-8 -*-
"""File generated according to SciDataTool/Generator/ClassesRef/Output/Data1D.csv
WARNING! All changes made in this file will be lost!
"""
from os import linesep
from SciDataTool.Classes._check import set_array, check_init_dict, check_var, raise_
from SciDataTool.Functions.save import save
Expand All @@ -14,7 +11,6 @@
except ImportError as error:
get_values = error
from numpy import array, array_equal, squeeze
from SciDataTool.Classes._check import InitUnKnowClassError


class Data1D(Data):
Expand All @@ -34,7 +30,7 @@ class Data1D(Data):
save = save

def __init__(
self, values=[], symbol="", name="", unit="", symmetries={}, init_dict=None,
self, values=[], symbol="", name="", unit="", symmetries={}, is_multiple=False, init_dict=None,
):
"""Constructor of the class. Can be use in two ways :
- __init__ (arg1 = 1, arg3 = 5) every parameters have name and default values
Expand All @@ -58,6 +54,8 @@ def __init__(
unit = init_dict["unit"]
if "symmetries" in list(init_dict.keys()):
symmetries = init_dict["symmetries"]
if "is_multiple" in list(init_dict.keys()):
is_multiple = init_dict["is_multiple"]
# Initialisation by argument
# values can be None, a ndarray or a list
set_array(self, "values", squeeze(values))
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

setuptools.setup(
name="SciDataTool",
version="0.1.1",
version="0.1.2",
author="Helene Toubin",
author_email="[email protected]",
description="Scientific Data Tool",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Eomys/SciDataTool",
download_url="https://github.com/Eomys/SciDataTool/archive/0.1.1.tar.gz",
download_url="https://github.com/Eomys/SciDataTool/archive/0.1.2.tar.gz",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 109e7d5

Please sign in to comment.