`maximum` element across the 2nd dim of a matrix with `missing` values

I am trying to find the maximum element across the 2nd dim of a matrix with missing values.

This code unfortunatelly gives an error:

A = [1 missing 3; 4 5 missing; 7 8 9]
B = maximum(skipmissing(A), dims=2)
ERROR: LoadError: MethodError: no method matching
maximum(::Base.SkipMissing{Array{Union{Missing, Int64},2}}; dims=2)

My questions is: shouldn’t this work?

I found another way of doing it but is not as clean:

B = [ maximum(skipmissing(row)) for row in eachrow(A) ]
1 Like
help?> skipmissing
Note that even if itr is a multidimensional array, the result will always be a
  Vector since it is not possible to remove missings while preserving dimensions of the input.

So after skipmissing, there is no dimension 2 left.
Thats probably why

maximum(::Base.SkipMissing{Array{Int64,2}}; dims=2)

has not been implemented

Actualy I think your solution is very clean!