Edit: Sorry, I didn't realize you created A from lists of lists of different sizes. My code shouldn't work unless you convert each element of A to an np.array using np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) for example.
You can try array-slicing or using NumPy's own iter function for ndarray's, called np.nditer:
In [7]: %%time
...: for arr in A:
...: arr[:] = 0
...:
CPU times: user 43 µs, sys: 13 µs, total: 56 µs
Wall time: 52.9 µs
In [8]: %%time
...: for arr in A:
...: for x in np.nditer(arr, op_flags=('readwrite',)):
...: x[...] = 0
...:
CPU times: user 42 µs, sys: 5 µs, total: 47 µs
Wall time: 47 µs
Documentation can be read here.
Also, since A is an ndarray that doesn't hold numbers, but rather holds references to other ndarray's (check A's dtype. It should be object), you shouldn't call np.nditer on A itself, but rather on the referenced arrays inside A. Otherwise, A's structure is destroyed:
In [9]: %%time
...: for arr in np.nditer(A, flags=('refs_ok',), op_flags=('readwrite',)):
...: for x in np.nditer(arr, flags=('refs_ok',), op_flags=('readwrite',)):
...: x[...] = 12
...:
CPU times: user 31 µs, sys: 2 µs, total: 33 µs
Wall time: 34.1 µs
In [10]: A
Out[10]: array([12, 12], dtype=object)
dtype=object). Out of curiosity, what are you doing with this array of objects? Generally there aren't a lot of advantages that you get from this sort of data-structure. - mgilson