Powerful machine learning library for Node.js – uses Python's scikit-learn under the hood.
I'm getting an error, but I'm definitely transmitting everything normally Node v22.2.0 Python 3.11 async function trendDirection(numbers) { let X = numbers.map((_, i) => [i]) let y = numbers console.log(X, y) let model = new sklearn.LinearRegression() await model.init(py) const model_data = await model.fit({ X, y }) let trend = model_data.coef_[0] > 0 ? 1 : model_data.coef_[0] < 0 ? -1 : 0 return trend } // LOG [ [ 0 ], [ 1 ], [ 2 ], [ 3 ], [ 4 ] ] [ 69361.6, 69363.9, 69362.7, 69362.8, 69362.7 ] /node_modules/@fisch0920/python-bridge/node_python_bridge.py", line 81, in default\n' + ' return o.__dict__\n' + ' ^^^^^^^^^^\n', "AttributeError: 'numpy.ndarray' object has no attribute '__dict__'\n"
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by Podolchak and has received 0 comments.