Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Nov 22, 2023
1 parent c25096d commit 7f4aff3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynxtools/dataconverter/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,10 @@ def extract_atom_types(formula, mode='hill'):
return atom_types


def transform_to_intended_dt(str_value) -> Optional[Any]:
"""
Transform string to the intended data type, if not then return str_value.
e.g '2.5E-2' will be transfor into 2.5E-2
def transform_to_intended_dt(str_value: Any) -> Optional[Any]:
"""Transform string to the intended data type, if not then return str_value.
E.g '2.5E-2' will be transfor into 2.5E-2
tested with: '2.4E-23', '28', '45.98', 'test', ['59', '3.00005', '498E-34'],
'23 34 444 5000', None
with result: 2.4e-23, 28, 45.98, test, [5.90000e+01 3.00005e+00 4.98000e-32],
Expand All @@ -643,7 +643,7 @@ def transform_to_intended_dt(str_value) -> Optional[Any]:
"""

symbol_list_for_data_seperation = [';', ' ']
transformed = ""
transformed: Any = None

if isinstance(str_value, list):
try:
Expand Down

0 comments on commit 7f4aff3

Please sign in to comment.