Skip to content

Commit 009b908

Browse files
committed
fix #42
1 parent 209c72e commit 009b908

File tree

5 files changed

+157
-159
lines changed

5 files changed

+157
-159
lines changed

src/abstractdataset/abstractdataset.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ julia> completecases(ds, [:x, :y])
784784
1
785785
```
786786
"""
787-
function completecases(ds::AbstractDataset, cols::MultiColumnIndex = :; mapformats = false, threads = nrow(ds)>__NCORES*10)
787+
function completecases(ds::AbstractDataset, cols::MultiColumnIndex = :; mapformats = false, threads = nrow(ds)>Threads.nthreads()*10)
788788
if mapformats
789789
colsidx = index(ds)[cols]
790790
by = Function[]
@@ -796,7 +796,7 @@ function completecases(ds::AbstractDataset, cols::MultiColumnIndex = :; mapforma
796796
byrow(ds, all, cols, by = !ismissing, threads = threads)
797797
end
798798
end
799-
completecases(ds::AbstractDataset, col::ColumnIndex; mapformats = false, threads = nrow(ds)>__NCORES*10) = completecases(ds, [col]; mapformats = mapformats, threads = threads)
799+
completecases(ds::AbstractDataset, col::ColumnIndex; mapformats = false, threads = nrow(ds)>Threads.nthreads()*10) = completecases(ds, [col]; mapformats = mapformats, threads = threads)
800800

801801
"""
802802
dropmissing(ds::AbstractDataset, cols=:; view::Bool=false, mapformats = false, threads)
@@ -859,7 +859,7 @@ julia> dropmissing(ds, [:x, :y])
859859
"""
860860
@inline function dropmissing(ds::AbstractDataset,
861861
cols::Union{ColumnIndex, MultiColumnIndex}=:;
862-
view::Bool=false, mapformats = false, threads = nrow(ds)>__NCORES*10)
862+
view::Bool=false, mapformats = false, threads = nrow(ds)>Threads.nthreads()*10)
863863
rowidxs = completecases(ds, cols; mapformats = mapformats, threads = threads)
864864
if view
865865
return Base.view(ds, rowidxs, :)

0 commit comments

Comments
 (0)