I am facing some trouble with the numpy genfromtxt fonction. It seems that the function is removing slashes from strings.
Here is a simplified version of my code that shows the problem.
Here, I create some dtype with a slash (/) in the string name.
import numpy as np
#Creating my_dtype
my_dtype = np.dtype([('test/slash','int')])
Without using the fonction genfromtxt, it is working.
print(my_dtype)
>>> [('test/slash', '<i8')]
Then, I try to extract data from a file, which for the example only contain one value. So it is a single row, single column file.
#Reading data from file
data = np.genfromtxt('test_data',dtype=my_dtype)
And here is the apperance of the behaviour that I don't understand.
print(my_dtype)
>>> [('testslash', '<i8')]
where I expect the slash in the name.
>>> [('test/slash', '<i8')]
It is the same for the data dtype.
print(data.dtype)
>>> [('testslash', '<i8')]
I tried this with python and python3 in Ubuntu 16.04 environment.