Home:ALL Converter>convert python numpy log array expression to cpp xtensor

convert python numpy log array expression to cpp xtensor

Ask Time:2021-05-01T00:14:16         Author:Bumblebee

Json Formatter

I'm trying to convert NumPy/python code to CPP/xtensor. I have difficulty converting the following statement.

data = pd.read_csv(input_file,sep=',')
v = data.values
x = v[1:]/v[:-1]
LX1 = np.log(x[t-(2*w) + 1:t - w + 1,:]) <=== how do I write this in cpp

How would I write this in xtensor?

Author:Bumblebee,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/67337199/convert-python-numpy-log-array-expression-to-cpp-xtensor
yy