Comments (6)
Hi! Thanks for reporting! I pushed a solution with custom setuptools commands. Numpy (with f2py), meson and meson-python must be available at installation time. Does this work for you?
from ffnet.
Hi! Thanks for reporting! I pushed a solution with custom setuptools commands. Numpy (with f2py), meson and meson-python must be available at installation time. Does this work for you?
Ooh. Thanks! I'll let you know tomorrow...once I figure out how to install meson on the cluster. 😄
from ffnet.
meson is pip installable...
from ffnet.
Good news, it installs!
Bad news, I think more changes are needed underneath. When I try to load it:
$ python3 -c 'import ffnet'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/discover/nobackup/mathomp4/Miniconda-Test/MINIpyD/24.1.2-0_py3.12/2024-03-22/lib/python3.12/site-packages/ffnet/__init__.py", line 17, in <module>
import ffnet.ffnet as ffnetmodule
File "/discover/nobackup/mathomp4/Miniconda-Test/MINIpyD/24.1.2-0_py3.12/2024-03-22/lib/python3.12/site-packages/ffnet/ffnet.py", line 16, in <module>
from scipy import zeros, ones, optimize, sqrt, ndarray, array
ImportError: cannot import name 'zeros' from 'scipy' (/discover/nobackup/mathomp4/Miniconda-Test/MINIpyD/24.1.2-0_py3.12/2024-03-22/lib/python3.12/site-packages/scipy/__init__.py)
I think these lines:
Lines 16 to 17 in 67279ab
need to become:
from numpy import zeros, ones, sqrt, ndarray, array
from scipy import optimize
If I do that, the README example works:
$ python3 ffnet_example.py
Feed-forward neural network:
inputs: 2
hiddens: 2
outputs: 1
connections and biases: 9
Testing results for 4 testing cases:
OUTPUT 1 (node nr 5):
Targets vs. outputs:
1 1.000000 1.000000
2 0.000000 0.500000
3 0.000000 0.000001
4 1.000000 0.499999
Regression line parameters:
slope = 0.499999
intercept = 0.250000
r-value = 0.707106
p-value = 0.292894
slope stderr = 0.353553
estim. stderr = 0.353553
(or, I guess, doesn't crash? Not sure what the answer should be).
That said, it's possible my suggested changes might need to be protected with try/except? Not sure when the bits moved from scipy to numpy...
from ffnet.
Change must be introduced in >scipy-1.10... Nevertheless, I introduced your changes, without try/except, this always should be written so :)
from ffnet.
@mrkwjc Things seem to be working well for me now! Thanks! I'll close this.
from ffnet.
Related Issues (10)
- Sklearn model HOT 3
- Running setup.py bdist_wheel for ffnet ... error HOT 1
- ffnet throwing TypeError HOT 2
- Possible Python 3.6 Package in Conda? HOT 2
- Import error with gcc-8 HOT 1
- Genetic algorithm training HOT 1
- pip install ffnet issue HOT 1
- Cannot pip install ffnet on Big Sur HOT 1
- Instalation issues HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffnet.