Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

safe_mapslices at test/reducedim.jl is broken on 0.7 #285

Closed
rofinn opened this issue Aug 21, 2017 · 2 comments
Closed

safe_mapslices at test/reducedim.jl is broken on 0.7 #285

rofinn opened this issue Aug 21, 2017 · 2 comments

Comments

@rofinn
Copy link
Member

rofinn commented Aug 21, 2017

This is what was causing the error on master in #280.

Code to reproduce:

julia> srand(1234)

julia> Areduc = DataArray(rand(3, 4, 5, 6), rand(3, 4, 5, 6) .< 0.2)

julia> region = 5

julia> outputs = Any[DataArray(fill(NaN, length.(Base.reduced_indices(indices(Areduc), region))))]

julia> function safe_mapslices{T}(f::Function, A::AbstractArray{T}, region, skipna)
# Copied from https://github.com/JuliaStats/DataArrays.jl/blob/master/test/reducedim.jl#L41
# ...

julia> safe_mapslices(mean, Areduc, region, true)
# 0.6
3×4×5×6 DataArrays.DataArray{Float64,4}:
3×4×5×6 DataArrays.DataArray{Float64,4}:
[:, :, 1, 1] =
   0.590845    0.460085  NaN         NaN
 NaN         NaN           0.298614    0.648882
   0.566237  NaN           0.246837  NaN

[:, :, 2, 1] =
 0.066423  0.112486  NaN           0.96467
 0.956753  0.276021    0.842714    0.945775
 0.646691  0.651664    0.950498  NaN

[:, :, 3, 1] =
 0.82116      0.314926  NaN         0.0118196
 0.0341601  NaN           0.438939  0.0460428
 0.0945445    0.374187  NaN         0.496169

...

# 0.7 
3×4×5×6 DataArrays.DataArray{Float64,4}:
3×4×5×6 DataArrays.DataArray{Float64,4}:
[:, :, 1, 1] =
 0.590845  0.460085  0.0       0.0
 0.0       0.0       0.298614  0.648882
 0.566237  0.0       0.246837  0.0

[:, :, 2, 1] =
 0.066423  0.112486  0.0       0.96467
 0.956753  0.276021  0.842714  0.945775
 0.646691  0.651664  0.950498  0.0

[:, :, 3, 1] =
 0.82116    0.314926  0.0       0.0118196
 0.0341601  0.0       0.438939  0.0460428
 0.0945445  0.374187  0.0       0.496169

...
@andreasnoack
Copy link
Member

Should be fixed by JuliaLang/julia#23385

@andreasnoack
Copy link
Member

We should restart the tests and confirm that this is fixed when master is not broken anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants