nt25 0.1.2__tar.gz → 0.1.3__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.
@@ -15,7 +15,6 @@ uv.lock
15
15
 
16
16
  # dataset
17
17
  ds/
18
- *.csv
19
- *.xlsx
20
-
21
18
 
19
+ # output
20
+ output/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nt25
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Neo's Tools of Python
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: matplotlib>=3.10.6
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nt25"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Neo's Tools of Python"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -4,6 +4,6 @@ from .lib import fio, calc, draw
4
4
  from .lib.draw import DType
5
5
 
6
6
  __version__ = meta.version(str(__package__))
7
- __samples_path__ = __file__.replace('__init__.py', 'samples')
7
+ __data_path__ = __file__.replace('__init__.py', 'data')
8
8
 
9
- __all__ = ('__version__', '__samples_path__', 'fio', 'calc', 'draw', 'DType')
9
+ __all__ = ('__version__', '__data_path__', 'fio', 'calc', 'draw', 'DType')
Binary file
@@ -92,7 +92,7 @@ def solveEq(eq, output=False, foo='solve'):
92
92
  s4e = re.sub(r'([-]?\d*\.\d+)', lambda m: str2e(m.group(0)), sol)
93
93
 
94
94
  if output:
95
- print(f'{foo}: {eq}\n x0 = {s4e}\n')
95
+ print(f'{foo}: {eq}\n\n x0 = {s4e}\n')
96
96
 
97
97
  real.append({
98
98
  'org': eq,
@@ -1,4 +1,5 @@
1
- from nt25 import fio, calc, draw, DType, __version__, __samples_path__
1
+ import os
2
+ from nt25 import fio, calc, draw, DType, __version__, __data_path__
2
3
 
3
4
  # import timeit
4
5
  # timeit.timeit('', number=100, globals=globals())
@@ -8,14 +9,16 @@ def main():
8
9
  print(f"Hello from {__package__}({__version__})! ")
9
10
 
10
11
  # [Neo] some file I/O: csv, xlsx
12
+ os.makedirs('output', exist_ok=True)
13
+
11
14
  fio.saveCSV({
12
15
  'Name': ['Alice', 'Bob', 'Charlie'],
13
16
  'Age': [25.2, 30, 35],
14
17
  'City': ['New York', 'Los Angeles', 'Chicago']
15
- }, "out.csv", colsInline=False)
18
+ }, "output/out.csv")
16
19
 
17
- data = fio.getXlsx(__samples_path__ + '/test.xlsx')
18
- fio.saveCSV(data, "out2.csv")
20
+ data = fio.getXlsx(__data_path__ + '/test.xlsx')
21
+ fio.saveCSV(data, "output/out2.csv")
19
22
 
20
23
  h = data[0]
21
24
  s = data[1]
@@ -67,7 +70,7 @@ def main():
67
70
  bar = calc.solveEq(foo['eq'], output=True)
68
71
 
69
72
  if len(bar) > 0:
70
- print('s> 750, 1.5 ~', bar[0]['func'](y=[750], x1=1.5))
73
+ print(f'solveEq(750, 1.5) ~ {bar[0]['func'](y=[750], x1=1.5):.4f}')
71
74
 
72
75
 
73
76
  if __name__ == "__main__":
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes