I am trying to write a generic script, part of which imports files separated by commas or separated by spaces. I would like the script to recognize any type. Is there a way to specify something like
arrayobj = np.genfromtxt(file.txt, delimiter=(',' OR '\t'), names=None, dtype=None)
I tried using the regex ( ',|\t' ), but that doesn't work either.
python numpy delimiter genfromtxt
PicalaxALT
source share