pyuff 2.5.3__tar.gz → 2.5.4__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.
- {pyuff-2.5.3 → pyuff-2.5.4}/PKG-INFO +2 -2
- {pyuff-2.5.3 → pyuff-2.5.4}/pyproject.toml +2 -2
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/__init__.py +1 -1
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_55.py +18 -18
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_58.py +2 -7
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/pyuff.py +2 -2
- {pyuff-2.5.3 → pyuff-2.5.4}/.gitignore +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/LICENSE +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/README.rst +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/__init__.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_15.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_151.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_164.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_18.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_1858.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_2411.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_2412.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_2414.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_2420.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_2429.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_2467.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/datasets/dataset_82.py +0 -0
- {pyuff-2.5.3 → pyuff-2.5.4}/pyuff/tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyuff
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.4
|
|
4
4
|
Summary: UFF (Universal File Format) read/write.
|
|
5
5
|
Project-URL: homepage, https://github.com/ladisk/pyuff
|
|
6
6
|
Project-URL: documentation, https://pyuff.readthedocs.io/en/latest/
|
|
@@ -15,7 +15,7 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Topic :: Scientific/Engineering
|
|
18
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
19
|
Requires-Dist: numpy
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: build; extra == 'dev'
|
|
@@ -4,14 +4,14 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyuff"
|
|
7
|
-
version = "2.5.
|
|
7
|
+
version = "2.5.4"
|
|
8
8
|
authors = [{name = "Primož Čermelj, Janko Slavič", email = "janko.slavic@fs.uni-lj.si"}]
|
|
9
9
|
maintainers = [{name = "Janko Slavič et al.", email = "janko.slavic@fs.uni-lj.si"}]
|
|
10
10
|
license = "MIT"
|
|
11
11
|
description = "UFF (Universal File Format) read/write."
|
|
12
12
|
readme = "README.rst"
|
|
13
13
|
keywords = ['UFF', 'UNV', 'Universal File Format', 'read/write']
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.11"
|
|
15
15
|
dependencies = [
|
|
16
16
|
"numpy",
|
|
17
17
|
]
|
|
@@ -672,18 +672,18 @@ def prepare_55(
|
|
|
672
672
|
raise ValueError('data_type can be 2:Real or 5:Complex')
|
|
673
673
|
if np.array(n_data_per_node).dtype != int and n_data_per_node != None:
|
|
674
674
|
raise TypeError('n_data_per_node must be integers')
|
|
675
|
-
if np.array(r1).dtype
|
|
676
|
-
raise TypeError('r1 must have float values')
|
|
677
|
-
if np.array(r2).dtype
|
|
678
|
-
raise TypeError('r2 must have float values')
|
|
679
|
-
if np.array(r3).dtype
|
|
680
|
-
raise TypeError('r3 must have float values')
|
|
681
|
-
if np.array(r4).dtype
|
|
682
|
-
raise TypeError('r4 must have float values')
|
|
683
|
-
if np.array(r5).dtype
|
|
684
|
-
raise TypeError('r5 must have float values')
|
|
685
|
-
if np.array(r6).dtype
|
|
686
|
-
raise TypeError('r6 must have float values')
|
|
675
|
+
if not np.issubdtype(np.array(r1).dtype, np.number) and r1 != None:
|
|
676
|
+
raise TypeError('r1 must have numeric (float or complex) values')
|
|
677
|
+
if not np.issubdtype(np.array(r2).dtype, np.number) and r2 != None:
|
|
678
|
+
raise TypeError('r2 must have numeric (float or complex) values')
|
|
679
|
+
if not np.issubdtype(np.array(r3).dtype, np.number) and r3 != None:
|
|
680
|
+
raise TypeError('r3 must have numeric (float or complex) values')
|
|
681
|
+
if not np.issubdtype(np.array(r4).dtype, np.number) and r4 != None:
|
|
682
|
+
raise TypeError('r4 must have numeric (float or complex) values')
|
|
683
|
+
if not np.issubdtype(np.array(r5).dtype, np.number) and r5 != None:
|
|
684
|
+
raise TypeError('r5 must have numeric (float or complex) values')
|
|
685
|
+
if not np.issubdtype(np.array(r6).dtype, np.number) and r6 != None:
|
|
686
|
+
raise TypeError('r6 must have numeric (float or complex) values')
|
|
687
687
|
if type(load_case) != int and load_case != None:
|
|
688
688
|
raise TypeError('load_case must be integer')
|
|
689
689
|
if type(mode_n) != int and mode_n != None:
|
|
@@ -696,12 +696,12 @@ def prepare_55(
|
|
|
696
696
|
raise TypeError('modal_damp_vis must be float')
|
|
697
697
|
if type(modal_damp_his) != float and modal_damp_his != None:
|
|
698
698
|
raise TypeError('modal_damp_his must be float')
|
|
699
|
-
if np.array(eig).dtype
|
|
700
|
-
raise TypeError('eig must be float')
|
|
701
|
-
if np.array(modal_a).dtype
|
|
702
|
-
raise TypeError('modal_a must be float')
|
|
703
|
-
if np.array(modal_b).dtype
|
|
704
|
-
raise TypeError('modal_b must be float')
|
|
699
|
+
if not np.issubdtype(np.array(eig).dtype, np.number) and eig != None:
|
|
700
|
+
raise TypeError('eig must be numeric (float or complex)')
|
|
701
|
+
if not np.issubdtype(np.array(modal_a).dtype, np.number) and modal_a != None:
|
|
702
|
+
raise TypeError('modal_a must be numeric (float or complex)')
|
|
703
|
+
if not np.issubdtype(np.array(modal_b).dtype, np.number) and modal_b != None:
|
|
704
|
+
raise TypeError('modal_b must be numeric (float or complex)')
|
|
705
705
|
if type(freq_step_n) != int and freq_step_n != None:
|
|
706
706
|
raise TypeError('freq_step_n must be int')
|
|
707
707
|
if np.array(node_nums).dtype != int and node_nums != None:
|
|
@@ -902,11 +902,6 @@ def _write58(fh, dset, mode='add', _filename=None, force_double=True):
|
|
|
902
902
|
|
|
903
903
|
# handling abscissa spacing automatically
|
|
904
904
|
# is_even = len( set( [ dset['x'][ii]-dset['x'][ii-1] for ii in range(1,len(dset['x'])) ] ) ) == 1
|
|
905
|
-
# decode utf to ascii
|
|
906
|
-
for k, v in dset.items():
|
|
907
|
-
if type(v) == str:
|
|
908
|
-
dset[k] = v.encode("utf-8").decode('ascii','ignore')
|
|
909
|
-
|
|
910
905
|
dset['abscissa_min'] = dset['x'][0]
|
|
911
906
|
dx = dset['x'][1] - dset['x'][0]
|
|
912
907
|
fh.write('%6i\n%6i' % (-1, 58))
|
|
@@ -977,9 +972,9 @@ def _write58(fh, dset, mode='add', _filename=None, force_double=True):
|
|
|
977
972
|
[fh.write(struct.pack('>d', datai)) for datai in data]
|
|
978
973
|
fh.close()
|
|
979
974
|
if mode.lower() == 'overwrite':
|
|
980
|
-
fh = open(_filename, 'wt')
|
|
975
|
+
fh = open(_filename, 'wt', encoding='utf-8')
|
|
981
976
|
elif mode.lower() == 'add':
|
|
982
|
-
fh = open(_filename, 'at')
|
|
977
|
+
fh = open(_filename, 'at', encoding='utf-8')
|
|
983
978
|
else:
|
|
984
979
|
if is_double: # write double precision
|
|
985
980
|
n4_blocks = len(data) // 4
|
|
@@ -416,13 +416,13 @@ class UFF:
|
|
|
416
416
|
if mode.lower() == 'overwrite':
|
|
417
417
|
# overwrite mode
|
|
418
418
|
try:
|
|
419
|
-
fh = open(self._filename, 'wt')
|
|
419
|
+
fh = open(self._filename, 'wt', encoding='utf-8')
|
|
420
420
|
except:
|
|
421
421
|
raise Exception('Cannot access the file: ' + self._filename + ' to write to.')
|
|
422
422
|
elif mode.lower() == 'add':
|
|
423
423
|
# add (append) mode
|
|
424
424
|
try:
|
|
425
|
-
fh = open(self._filename, 'at')
|
|
425
|
+
fh = open(self._filename, 'at', encoding='utf-8')
|
|
426
426
|
except:
|
|
427
427
|
raise Exception('Cannot access the file: ' + self._filename + ' to write to.')
|
|
428
428
|
else:
|
|
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
|