Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change branched logic on m_tools_ph3.py #194

Open
kmilo9999 opened this issue Mar 12, 2024 · 0 comments
Open

Change branched logic on m_tools_ph3.py #194

kmilo9999 opened this issue Mar 12, 2024 · 0 comments

Comments

@kmilo9999
Copy link
Collaborator

          All the branches do the same thing here! Maybe the intend is to use `np.floor` if `case == "floor"`, etc.?
    _case_func = {
    'round': np.round,
    'floor': np.floor,
    'ceil': np.ceil
    }

    if case in _case_func:
        case_func = _case_func[case]
        for k in np.logspace(0, 24, 25):
            if case_func(a/k) == 1:
                return k
    else:
        raise Warning('no proper case')

Originally posted by @cpaniaguam in #131 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant