Skip to content

Homework numpy#4

Open
ibragimovaamina wants to merge 3 commits into
mainfrom
homework_numpy
Open

Homework numpy#4
ibragimovaamina wants to merge 3 commits into
mainfrom
homework_numpy

Conversation

@ibragimovaamina

Copy link
Copy Markdown
Owner

Added numpy_challenge.py script.


# This function computes matrix multiplication of several matrices (if possible)
def multiply_matrices(*matrices):
if multiplication_check(*matrices):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return np.matmul(matrix1, matrix2)

# This function checks whether multiple matrices can be multiplied
def multiplication_check(*matrices):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не стоит считывать через *args, если обещали передавать один список.

  • оборачивает переданное в ещё один свой список, работать просто так не будет :)

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

Successfully merging this pull request may close these issues.

2 participants