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

Problem with update_commission_fee() #26

Open
myroom opened this issue Sep 8, 2022 · 3 comments
Open

Problem with update_commission_fee() #26

myroom opened this issue Sep 8, 2022 · 3 comments

Comments

@myroom
Copy link

myroom commented Sep 8, 2022

Hello

There is an error when starting, what could be the problem?

path_optimizer.py:241: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
self.commission_matrix[np.meshgrid(indexes, indexes, indexing='ij', sparse=True)] = self.trading_fee[
Traceback (most recent call last):
File "main.py", line 40, in
path_optimizer.find_arbitrage()
File "path_optimizer.py", line 101, in find_arbitrage
self.update_commission_fee()
File "path_optimizer.py", line 241, in update_commission_fee
self.commission_matrix[np.meshgrid(indexes, indexes, indexing='ij', sparse=True)] = self.trading_fee[
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Process finished with exit code 1

@myroom
Copy link
Author

myroom commented Sep 8, 2022

image

@mrdjehknhc
Copy link

same issue , did you find solution ?

@OPAYA
Copy link

OPAYA commented Jan 23, 2023

you should use a 0 index .
self.commission_matrix[np.meshgrid(indexes, indexes, indexing='ij', sparse=True)[0]] = self.trading_fee[exc_name]

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

3 participants