Skip to content

Commit

Permalink
some minor fixes (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
sl-solution authored Mar 7, 2024
1 parent a91a6d5 commit c7887a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
Compat = "3.17, 4"
DataAPI = "1.8"
DataAPI = "1.16"
InvertedIndices = "1"
IteratorInterfaceExtensions = "0.1.1, 1"
Missings = "0.4.2, 1"
Expand Down
1 change: 1 addition & 0 deletions src/InMemoryDatasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import DataAPI,
DataAPI.antijoin,
DataAPI.nrow,
DataAPI.ncol,
DataAPI.groupby,
# DataAPI.crossjoin,
Tables,
Tables.columnindex
Expand Down
5 changes: 4 additions & 1 deletion src/abstractdataset/iteration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,10 @@ Base.show(dfcs::DatasetColumns;
# prevent using broadcasting to mutate columns e.g. in pop!.(eachcol(ds))
# TODO customise Base.broadcasted to handle the situation
for f in filter(x->occursin(r"!$", String(x)), names(Base))
@eval Base.broadcasted(::typeof($f), ::DatasetColumns, args...) = throw(ArgumentError("broadcasting `$(nameof($f))` over DatasetColums is reserved."))
# FIXME due to a bug in Julia > 1.11 !?
if isdefined(Main, f)
@eval Base.broadcasted(::typeof($f), ::DatasetColumns, args...) = throw(ArgumentError("broadcasting `$(nameof($f))` over DatasetColums is reserved."))
end
end
for f in filter(x->occursin(r"!$", String(x)), names(Statistics))
@eval Base.broadcasted(::typeof($f), ::DatasetColumns, args...) = throw(ArgumentError("broadcasting `$(nameof($f))` over DatasetColums is reserved."))
Expand Down

0 comments on commit c7887a5

Please sign in to comment.