there is an easy solution with a list comprehension,

```
A = [i for i in A if i not in B]
```

Result

```
[[1, 1, 2], [1, 1, 3]]
```

List comprehension is not removing the elements from the array, it’s just reassigning – if you want to remove the elements, use this method:

```
for i in B:
if i in A:
A.remove(i)
```

### Related Contents:

- How do I access the ith column of a NumPy multidimensional array?
- Sorting arrays in NumPy by column
- Frequency counts for unique values in a NumPy array
- What is the difference between ndarray and array in NumPy?
- ValueError: setting an array element with a sequence
- Find unique rows in numpy.array
- How to count the number of true elements in a NumPy bool array
- Numpy matrix to array
- Add single element to array in numpy
- initialize a numpy array
- Numpy: Divide each row by a vector element
- How to save and load numpy.array() data properly?
- how does multiplication differ for NumPy Matrix vs Array classes?
- subsampling every nth entry in a numpy array
- python how to pad numpy array with zeros
- Numpy array assignment with copy
- Multiplying across in a numpy array
- Flattening a list of NumPy arrays?
- Difference between a -= b and a = a – b in Python
- Count all values in a matrix less than a value
- Selecting specific rows and columns from NumPy array
- How to round a numpy array?
- Initialise numpy array of unknown length
- Python: find position of element in array
- check how many elements are equal in two numpy arrays python
- Numpy minimum in (row, column) format
- Interweaving two numpy arrays efficiently
- Replace -inf with zero value
- Concatenating empty array in Numpy
- Python: slicing a multi-dimensional array
- Store different datatypes in one NumPy array?
- how to perform max/mean pooling on a 2d array using numpy
- numpy-equivalent of list.pop?
- np arrays being immutable – “assignment destination is read-only”
- numpy array: replace nan values with average of columns
- Mapping a NumPy array in place
- NumPy first and last element from array
- What does axis = 0 do in Numpy’s sum function?
- What does [:, :] mean on NumPy arrays
- Numpy Array to base64 and back to Numpy Array – Python
- Difference between frompyfunc and vectorize in numpy
- Overlay an image segmentation with numpy and matplotlib
- numpy savetxt formatted as integer is not saving zeroes
- 2D array indexing
- How do I extract a sub-array from a numpy 2d array? [duplicate]
- How to find max value in a numpy array column?
- Why does the shape of a 1D array not show the number of rows as 1?
- numpy array row major and column major
- returning numpy arrays via pybind11
- arrays obtained from Image.open with np.asarray being immutable – “assignment destination is read-only”