Closed km-git-acc closed 6 years ago
Pushed a minor change to fix the error in
python -m unittest
@sujitnair Made some changes. return Nt has been eliminated and we return the result in the previous line itself. Added 'from mpmath import mp' in fast_calc. Also, mp seems to be a module within mpmath, among other modules. Renaming mpmath as mp causes some errors.
@Sujit
I get an error trying to set up the virtual environment in Python 3.6.3:
bash$ /usr/local/bin/python3 -m venv venv
Error: Command '['/home/david/dbn/dbn_upper_bound/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
[david@localhost dbn_upper_bound]$
I cloned Master using git, and have Python 3.6.3 installed.
David
On 02/13/2018 12:50 PM, Sujit Nair wrote:
@sujitnair commented on this pull request.
In dbn_upper_bound/python/mputility.py https://github.com/km-git-acc/dbn_upper_bound/pull/41#discussion_r167946520:
'''End H_t approx functional eqn (Ht_AFE) block''' + +'''Miscellanous useful functions''' +def Nt(t, T):
- t, T = mp.mpf(t), mp.mpf(T)
- Tsmall = T/(4 * mp.pi())
- N0 = Tsmall * mp.log(Tsmall) - Tsmall
- extra = (t/16.0) * mp.log(Tsmall)
- Nt = N0 + extra
@km-git-acc https://github.com/km-git-acc
In line 250, we have "Redefining name 'Nt' from outer scope (line 250) (redefined-outer-name)"
This is because, we have a variable Nt and a function Nt with the same name. This needs to be fixed.
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/km-git-acc/dbn_upper_bound/pull/41#pullrequestreview-96237137, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_If7eYO0blQUczfwGKR-JBAqqB9EKnks5tUctjgaJpZM4SEFaT.
@mariotrevi A similar error was received when python3 -m env env was executed on an anaconda distribution of python 3.6.3. Edit: The python folder has been edited to work without the virtual environment.
👍 @km-git-acc
@mariotrevi @dhjpolymath I made a separate issue to resolve the virtual environment problems you guys are facing.
Added fast_zero_calc.py which allows quick detection of H_t roots. Also added some commonly used functions like sign_change to mputility