# Help to understand the 2d arrays outputs in 6 NumPy Boolean Masks Practice Problems

Hello Dataquest community In the NumPy Boolean Masks Practice Problems series there are a few problems where we are instructed to create a 1-dimensional array with the help of a boolean mask.
In the Data Engineer Path > STEP 5 of 6 Handling Large Data Sets In Python, COURSE 1 / 5 Numpy for Data Engineers, Datasets and Boolean Indexing, the 9.Boolean Masks in Higher Dimensions screen (https://app.dataquest.io/m/509/datasets-and-boolean-indexing/9/boolean-masks-in-higher-dimensions) very clearly states
However, the result of applying a boolean mask is always a 1-dimensional array, even when applied to 2-dimensional arrays.

However, in 6 practice problems I found out that the resulting nd array is actually 2 dimensional. So I’m currently quite confused
Here are the practice problems concerned followed by my code if you could please advise me on what I am missing to explain this very-strange-to-me results.

``````#Create a 1-dimensional array named rows_larger_30 that contains the rows of the provided ndarray x whose sum is larger than 30.
rows_larger_30 = x[x.sum(axis=1) > 30]
print(rows_larger_30.ndim)
#Output
2
``````
``````#Create a ndarray named cols_larger_30 that contains the columns of the provided ndarray x whose sum is larger than 30.
cols_larger_30 = x[:,x.sum(axis=0) > 30]
print(cols_larger_30.ndim)
#Output
2
``````
``````#Create a 1-dimensional array named rows_without_zeros that contains all rows of x that do not contain zeros.
mask = np.count_nonzero(x, axis=1) == x.shape
print(rows_without_zeros.ndim)
#Output
2
``````
``````#Create a 1-dimensional array named rows_with_zeros that contains all rows of x that contain at least one zero.
mask = np.count_nonzero(x, axis=1) < x.shape
print(rows_with_zeros.ndim)
#Output
2
``````
``````#Create a 1-dimensional array named cols_without_zeros that contains all columns of x that do not contain zeros.
mask = np.count_nonzero(x, axis=0) == x.shape
print(cols_without_zeros)
#Output
2
``````
``````#Create a 1-dimensional array named cols_with_zeros that contains all columns of x that contain at least one zero.
mask = np.count_nonzero(x, axis = 0) < x.shape