I'm using Chaquopy
in my android project. I have a function in my python class which it returns a 2D array as a PyObject
type. Now, I want to convert it to 2D array in my java class. How can I achieve this?
EDIT : Here is my Python code :
import numpy as np
from scipy.io import wavfile
def get_python_audio(file_path):
fs, data_test = wavfile.read(file_path)
print('data_test:', data_test.shape)
data = data_test[:, 0]
data = data[:, np.newaxis]
print('data:', data.shape)
return data