ipyvasp 0.9.88__tar.gz → 0.9.89__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/PKG-INFO +1 -1
- ipyvasp-0.9.89/ipyvasp/_version.py +1 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/utils.py +3 -2
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp.egg-info/PKG-INFO +1 -1
- ipyvasp-0.9.88/ipyvasp/_version.py +0 -1
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/LICENSE +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/README.md +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/__init__.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/__main__.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/_enplots.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/_lattice.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/bsdos.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/cli.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/core/__init__.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/core/parser.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/core/plot_toolkit.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/core/serializer.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/core/spatial_toolkit.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/evals_dataframe.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/lattice.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/misc.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/potential.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp/widgets.py +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp.egg-info/SOURCES.txt +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp.egg-info/dependency_links.txt +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp.egg-info/entry_points.txt +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp.egg-info/requires.txt +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/ipyvasp.egg-info/top_level.txt +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/setup.cfg +0 -0
- {ipyvasp-0.9.88 → ipyvasp-0.9.89}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.89"
|
|
@@ -42,7 +42,7 @@ def take(f, rows, cols=None, dtype=None, exclude=None,sep=None):
|
|
|
42
42
|
Negative indexing is not supported in cols because of variable length of each line.
|
|
43
43
|
If `cols=None`, returns a single str of line if one integer given, otherwise a list of lines.
|
|
44
44
|
If `cols` is int ot sequence of int, each line is splitted by `sep` (default all whitespaces) and `dtype` is applied over resulting fields.
|
|
45
|
-
`exclude` should be regex. It removes lines after selection by `rows`.
|
|
45
|
+
`exclude` should be regex. It removes matching lines after selection by `rows`. Empty lines are also discarded if `cols` is given.
|
|
46
46
|
|
|
47
47
|
Returns list (nested or plain) or single value or None based on `rows` and `cols` selection.
|
|
48
48
|
|
|
@@ -86,7 +86,7 @@ def take(f, rows, cols=None, dtype=None, exclude=None,sep=None):
|
|
|
86
86
|
if exclude:
|
|
87
87
|
lines = (l for l in lines if not re.search(exclude,l))
|
|
88
88
|
|
|
89
|
-
if cols:
|
|
89
|
+
if cols is not None:
|
|
90
90
|
conv = dtype if callable(dtype) else (lambda v: v)
|
|
91
91
|
return_col = False
|
|
92
92
|
if isinstance(cols, int):
|
|
@@ -96,6 +96,7 @@ def take(f, rows, cols=None, dtype=None, exclude=None,sep=None):
|
|
|
96
96
|
if not isinstance(cols, (list,tuple, range)):
|
|
97
97
|
raise TypeError(f"cols should be a sequce of integers or single int, got {type(cols)}")
|
|
98
98
|
|
|
99
|
+
lines = (l for l in lines if l.strip()) # remove empty lines after indexing and only if cols are given
|
|
99
100
|
lines = ([conv(v) for i, v in enumerate(l.split(sep)) if i in cols] for l in lines)
|
|
100
101
|
|
|
101
102
|
if return_col:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.9.88"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|