[Python 3] Using Numpy
\nimport numpy as np\n\nclass NumArray:\n    def __init__(self, nums: List[int]):\n        self.nums = np.array(nums)\n\n    def update(self, index: int, val: i
```\nimport numpy as np\n\nclass NumArray:\n    def __init__(self, nums: List[int]):\n        self.nums = np.array(nums)\n\n    def update(self, index: int, val: int) -> None:\n        self.nums[index] = val\n\n    def sumRange(self, left: int, right: int) -> int:\n        return np.sum(self.nums[left: right+1])\n```
[]