symmetric behavior load/save

default name reflects fact that material.yaml has a fixed name
This commit is contained in:
Martin Diehl 2020-11-04 21:14:08 +01:00
parent ae959b9cc2
commit 01af348cd9
1 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,20 @@ class ConfigMaterial(Config):
super().save(fname,**kwargs) super().save(fname,**kwargs)
@classmethod
def load(cls,fname='material.yaml'):
"""
Load from yaml file.
Parameters
----------
fname : file, str, or pathlib.Path, optional
Filename or file for writing. Defaults to 'material.yaml'.
"""
return super(ConfigMaterial,cls).load(fname)
@staticmethod @staticmethod
def from_table(table,constituents={},**kwargs): def from_table(table,constituents={},**kwargs):
""" """