Sometimes when dealing with arrays with intermittent non-numerical values (e.g., NaNs imported from external sources), the common arithmetic functions (e.g., Median) may break annoyingly.
Although it's possible to replace those NaNs with Indeterminate and then carefully remove them before applying the arithmetic functions, such operations are rather tedious compared to other computing environments (e.g., numpy) where similar functions would quietly ignore those NaNs and produce results.
I'm wondering if we can create a similar pure numeric environment in Mathematica that can do such jobs more easily?
For example, for an arbitrary array generated using the code below:
arNaN = Array[
RandomChoice[{RandomReal[], Indeterminate}] &, {4, 2, 3, 5}]
How can we apply the common arithmetic functions (e.g., Median, Quartiles, etc.) without deliberately removing the non-numerical items?
For people who are also familiar with numpy/pandas, I would like something similar there like numpy.nanmedian/pandas.DataFrame.median which can quietly ignore NaN values.

Missing[]rather thanIndeterminate, then combine those numeric functions withDeleteMissing. For instance, instead ofMediantryMedian@*DeleteMissing. – MarcoB Apr 14 '21 at 19:56Missing-based approach usually needs one to deliberately specify the levels whereDeleteMissingshould be applied and would create ragged arrays, leading to failure of common arithmetic functions. So it's not an ideal approach for dealing with regular arrays of arbitrary dimensions. – sunt05 Apr 14 '21 at 20:01Block[{Indeterminate = Nothing}, arNaN /. a : {___?NumericQ} :> Median[a]]? – kglr Apr 14 '21 at 20:54