loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.12552984573470072","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IG51bXB5IGFzIG5wCgp4ID0gbnAuYXJyYXkoW1sxLDJdLFszLDRdXSkKCnByaW50KG5wLnN1bSh4KSkgICMgQ29tcHV0ZSBzdW0gb2YgYWxsIGVsZW1lbnRzOyBwcmludHMgIjEwIgpwcmludChucC5zdW0oeCwgYXhpcz0wKSkgICMgQ29tcHV0ZSBzdW0gb2YgZWFjaCBjb2x1bW47IHByaW50cyAiWzQgNl0iCnByaW50KG5wLnN1bSh4LCBheGlzPTEpKSAgIyBDb21wdXRlIHN1bSBvZiBlYWNoIHJvdzsgcHJpbnRzICJbMyA3XSIK"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
import numpy as np

x = np.array([[1,2],[3,4]])

print(np.sum(x))  # Compute sum of all elements; prints "10"
print(np.sum(x, axis=0))  # Compute sum of each column; prints "[4 6]"
print(np.sum(x, axis=1))  # Compute sum of each row; prints "[3 7]"