We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example: print(len(bosonic.fock.basis(11,4))) gives correct result print(bosonic.fock.basis_size(11,4)) gives the following error:
print(len(bosonic.fock.basis(11,4)))
print(bosonic.fock.basis_size(11,4))
File "bosonic\fock.pyx", line 109, in bosonic.fock.basis_size OverflowError: Python int too large to convert to C long
Possible solution: I forked the code, (converted to python 3) and changed bosonic.fock.basis_size to:
def basis_size(int n, int m): cdef int res = scipy.special.binom(n+m-1,n) return res
A more efficient solution should be possible.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example:
print(len(bosonic.fock.basis(11,4)))
gives correct resultprint(bosonic.fock.basis_size(11,4))
gives the following error:Possible solution:
I forked the code, (converted to python 3) and changed bosonic.fock.basis_size to:
A more efficient solution should be possible.
The text was updated successfully, but these errors were encountered: