changes on scan

This commit is contained in:
2020-11-18 11:39:26 -03:00
parent adf52e857b
commit 5c2c551c27
7 changed files with 8 additions and 11 deletions

View File

@@ -20,18 +20,12 @@
import numpy as np import numpy as np
import pandas as pd import pandas as pd
def numpy(path, sep=None, decimal=None): def numpy(path, sep=None):
if sep is None: if sep is None:
sep = "," sep = ","
if decimal is None: return np.genfromtxt(path, delimiter=sep)
decimal = "."
df=pd.read_csv(path, sep=sep, decimal=decimal, header=None)
array = df.to_numpy()
return array
def pandas(path, sep=None, decimal=None): def pandas(path, sep=None, decimal=None):

View File

@@ -17,5 +17,8 @@
# with this program; if not, write to the Free Software Foundation, Inc., # with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from .write import numpy as np from .write import numpy
from .write import pandas as pd from .write import pandas
np = numpy()
pd = pandas()