Stuck on building my mask. May be a simple python problem. The example depicts
masking a 1D array and I am not sure how to translate that into taking the 3D pred and building a mask from the first 2D. Any guidance would be appreciated.
Hi @yodester
Masking 1D or 3D array is simple with numpy
- just check against the value you want:
But note that in the Assignment you are masking the 2D array (it doesn’t matter anyway, the code is the same):
mask = array != some_value
Thanks for the response. I believe I am trying to mask the wrong array. I need the array that contains the words where the pad character resides.
I will look again tonight when I get off work.
Thanks again.
Please can someone help more on the code implementation for this part of the assignment? Struggling to get past this step in the assignment.
Instructions:
# the first mask to extract the diagonal elements,
# the second mask to extract elements in the negative_zero_on_duplicate matrix that are larger than the elements in the diagonal
mask_exclude_positives = (None)|(None)
Hi Did you get the solution