wip - more dicts entries added
This commit is contained in:
parent
64299a9773
commit
e11713b302
@ -18,58 +18,594 @@ import numpy as np
|
||||
"""
|
||||
|
||||
""",
|
||||
"q4": "4. How to find the memory size of any array (★☆☆)",
|
||||
"h4": "hint: size, itemsize",
|
||||
"a4":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q5": "5. How to get the documentation of the numpy add function from the command line? (★☆☆)",
|
||||
"h5": "hint: np.info",
|
||||
"a5":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q6": "6. Create a null vector of size 10 but the fifth value which is 1 (★☆☆)",
|
||||
"h6": "hint: array[4]",
|
||||
"a6":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q7": "7. Create a vector with values ranging from 10 to 49 (★☆☆)",
|
||||
"h7": "hint: arange",
|
||||
"a7":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q8": "8. Reverse a vector (first element becomes last) (★☆☆)",
|
||||
"h8": "hint: array[::-1]",
|
||||
"a8":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q9": "9. Create a 3x3 matrix with values ranging from 0 to 8 (★☆☆)",
|
||||
"h9": "hint: reshape",
|
||||
"a9":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q10": "10. Find indices of non-zero elements from [1,2,0,0,4,0] (★☆☆)",
|
||||
"h10": "hint: np.nonzero",
|
||||
"a10":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q11": "11. Create a 3x3 identity matrix (★☆☆)",
|
||||
"h11": "hint: np.eye",
|
||||
"a11":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q12": "12. Create a 3x3x3 array with random values (★☆☆)",
|
||||
"h12": "hint: np.random.random",
|
||||
"a12":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q13": "",
|
||||
"h13": "hint: ",
|
||||
"a13":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q14": "",
|
||||
"h14": "hint: ",
|
||||
"a14":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q15": "",
|
||||
"h15": "hint: ",
|
||||
"a15":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q16": "",
|
||||
"h16": "hint: ",
|
||||
"a16":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q17": "",
|
||||
"h17": "hint: ",
|
||||
"a17":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q18": "",
|
||||
"h18": "hint: ",
|
||||
"a18":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q19": "",
|
||||
"h19": "hint: ",
|
||||
"a19":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q20": "",
|
||||
"h20": "hint: ",
|
||||
"a20":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q21": "",
|
||||
"h21": "hint: ",
|
||||
"a21":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q22": "",
|
||||
"h22": "hint: ",
|
||||
"a22":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q23": "",
|
||||
"h23": "hint: ",
|
||||
"a23":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q24": "",
|
||||
"h24": "hint: ",
|
||||
"a24":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q25": "",
|
||||
"h25": "hint: ",
|
||||
"a25":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q26": "",
|
||||
"h26": "hint: ",
|
||||
"a26":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q27": "",
|
||||
"h27": "hint: ",
|
||||
"a27":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q28": "",
|
||||
"h28": "hint: ",
|
||||
"a28":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q29": "",
|
||||
"h29": "hint: ",
|
||||
"a29":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q30": "",
|
||||
"h30": "hint: ",
|
||||
"a30":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q31": "",
|
||||
"h31": "hint: ",
|
||||
"a31":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q32": "",
|
||||
"h32": "hint: ",
|
||||
"a32":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q33": "",
|
||||
"h33": "hint: ",
|
||||
"a33":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q34": "",
|
||||
"h34": "hint: ",
|
||||
"a34":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q35": "",
|
||||
"h35": "hint: ",
|
||||
"a35":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q36": "",
|
||||
"h36": "hint: ",
|
||||
"a36":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q37": "",
|
||||
"h37": "hint: ",
|
||||
"a37":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q38": "",
|
||||
"h38": "hint: ",
|
||||
"a38":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q39": "",
|
||||
"h39": "hint: ",
|
||||
"a39":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q40": "",
|
||||
"h40": "hint: ",
|
||||
"a40":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q41": "",
|
||||
"h41": "hint: ",
|
||||
"a41":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q42": "",
|
||||
"h42": "hint: ",
|
||||
"a42":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q43": "",
|
||||
"h43": "hint: ",
|
||||
"a43":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q44": "",
|
||||
"h44": "hint: ",
|
||||
"a44":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q45": "",
|
||||
"h45": "hint: ",
|
||||
"a45":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q46": "",
|
||||
"h46": "hint: ",
|
||||
"a46":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q47": "",
|
||||
"h47": "hint: ",
|
||||
"a47":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q48": "",
|
||||
"h48": "hint: ",
|
||||
"a48":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q49": "",
|
||||
"h49": "hint: ",
|
||||
"a49":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q50": "",
|
||||
"h50": "hint: ",
|
||||
"a50":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q51": "",
|
||||
"h51": "hint: ",
|
||||
"a51":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q52": "",
|
||||
"h52": "hint: ",
|
||||
"a52":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q53": "",
|
||||
"h53": "hint: ",
|
||||
"a53":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q54": "",
|
||||
"h54": "hint: ",
|
||||
"a54":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q55": "",
|
||||
"h55": "hint: ",
|
||||
"a55":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q56": "",
|
||||
"h56": "hint: ",
|
||||
"a56":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q57": "",
|
||||
"h57": "hint: ",
|
||||
"a57":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q58": "",
|
||||
"h58": "hint: ",
|
||||
"a58":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q59": "",
|
||||
"h59": "hint: ",
|
||||
"a59":
|
||||
"""
|
||||
|
||||
""",
|
||||
|
||||
"q60": "",
|
||||
"h60": "hint: ",
|
||||
"a60":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q61": "",
|
||||
"h61": "hint: ",
|
||||
"a61":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q62": "",
|
||||
"h62": "hint: ",
|
||||
"a62":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q63": "",
|
||||
"h63": "hint: ",
|
||||
"a63":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q64": "",
|
||||
"h64": "hint: ",
|
||||
"a64":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q65": "",
|
||||
"h65": "hint: ",
|
||||
"a65":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q66": "",
|
||||
"h66": "hint: ",
|
||||
"a66":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q67": "",
|
||||
"h67": "hint: ",
|
||||
"a67":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q68": "",
|
||||
"h68": "hint: ",
|
||||
"a68":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q69": "",
|
||||
"h69": "hint: ",
|
||||
"a69":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q70": "",
|
||||
"h70": "hint: ",
|
||||
"a70":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q71": "",
|
||||
"h71": "hint: ",
|
||||
"a71":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q72": "",
|
||||
"h72": "hint: ",
|
||||
"a72":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q73": "",
|
||||
"h73": "hint: ",
|
||||
"a73":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q74": "",
|
||||
"h74": "hint: ",
|
||||
"a74":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q75": "",
|
||||
"h75": "hint: ",
|
||||
"a75":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q76": "",
|
||||
"h76": "hint: ",
|
||||
"a76":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q77": "",
|
||||
"h77": "hint: ",
|
||||
"a77":
|
||||
"""
|
||||
|
||||
""",
|
||||
|
||||
"q78": "",
|
||||
"h78": "hint: ",
|
||||
"a78":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q79": "",
|
||||
"h79": "hint: ",
|
||||
"a79":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q80": "",
|
||||
"h80": "hint: ",
|
||||
"a80":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q81": "",
|
||||
"h81": "hint: ",
|
||||
"a81":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q82": "",
|
||||
"h82": "hint: ",
|
||||
"a82":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q83": "",
|
||||
"h83": "hint: ",
|
||||
"a83":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q84": "",
|
||||
"h84": "hint: ",
|
||||
"a84":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q85": "",
|
||||
"h85": "hint: ",
|
||||
"a85":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q86": "",
|
||||
"h86": "hint: ",
|
||||
"a86":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q87": "",
|
||||
"h87": "hint: ",
|
||||
"a87":
|
||||
"""
|
||||
|
||||
""",
|
||||
|
||||
"q88": "",
|
||||
"h88": "hint: ",
|
||||
"a88":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q89": "",
|
||||
"h89": "hint: ",
|
||||
"a89":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q90": "",
|
||||
"h90": "hint: ",
|
||||
"a90":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q91": "",
|
||||
"h91": "hint: ",
|
||||
"a91":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q92": "",
|
||||
"h92": "hint: ",
|
||||
"a92":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q93": "",
|
||||
"h93": "hint: ",
|
||||
"a93":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q94": "",
|
||||
"h94": "hint: ",
|
||||
"a94":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q95": "",
|
||||
"h95": "hint: ",
|
||||
"a95":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q96": "",
|
||||
"h96": "hint: ",
|
||||
"a96":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q97": "",
|
||||
"h97": "hint: ",
|
||||
"a97":
|
||||
"""
|
||||
|
||||
""",
|
||||
|
||||
"q98": "",
|
||||
"h98": "hint: ",
|
||||
"a98":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q99": "",
|
||||
"h99": "hint: ",
|
||||
"a99":
|
||||
"""
|
||||
|
||||
""",
|
||||
"q100": "",
|
||||
"h100": "hint: ",
|
||||
"a100":
|
||||
"""
|
||||
|
||||
""",
|
||||
}
|
||||
# #### 4. How to find the memory size of any array (★☆☆)
|
||||
#
|
||||
# (**hint**: size, itemsize)
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 5. How to get the documentation of the numpy add function from the command line? (★☆☆)
|
||||
#
|
||||
# (**hint**: np.info)
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 6. Create a null vector of size 10 but the fifth value which is 1 (★☆☆)
|
||||
#
|
||||
# (**hint**: array\[4\])
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 7. Create a vector with values ranging from 10 to 49 (★☆☆)
|
||||
#
|
||||
# (**hint**: np.arange)
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 8. Reverse a vector (first element becomes last) (★☆☆)
|
||||
#
|
||||
# (**hint**: array\[::-1\])
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 9. Create a 3x3 matrix with values ranging from 0 to 8 (★☆☆)
|
||||
#
|
||||
# (**hint**: reshape)
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 10. Find indices of non-zero elements from \[1,2,0,0,4,0\] (★☆☆)
|
||||
#
|
||||
# (**hint**: np.nonzero)
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 11. Create a 3x3 identity matrix (★☆☆)
|
||||
#
|
||||
# (**hint**: np.eye)
|
||||
#
|
||||
#
|
||||
#
|
||||
# #### 12. Create a 3x3x3 array with random values (★☆☆)
|
||||
# ####
|
||||
#
|
||||
# (**hint**: np.random.random)
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user