Skip to content

Commit 947ab45

Browse files
committed
change function type to ::F where F <: Function
1 parent df10bbb commit 947ab45

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# v0.11.1 (Upcoming Release)
2-
- Concrete types of X and y changed to AbstractMatrix{Float64} and AbstractVector{Float64}
32

3+
- Concrete types of X and y changed to AbstractMatrix{Float64} and AbstractVector{Float64}
4+
- Change function signatures from ::Function to ::F where {F <: Function}
45

56
# v0.11.0
67

src/basis.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ end
273273
Apply function f to each columns of data.
274274
275275
# Arguments
276-
- `f::Function`: A function that takes a one dimensional array as argument.
276+
- `f <: Function`: A function that takes a one dimensional array as argument.
277277
- `data::DataFrame`: A DataFrame object.
278278
279279
"""
280-
function applyColumns(f::Function, data::DataFrame)
280+
function applyColumns(f::F, data::DataFrame) where {F <: Function}
281281
return [f(col) for col in eachcol(data)]
282282
end
283283

@@ -289,10 +289,10 @@ end
289289
Apply function f to each columns of data.
290290
291291
# Arguments
292-
- `f::Function`: A function that takes a one dimensional array as argument.
292+
- `f <: Function`: A function that takes a one dimensional array as argument.
293293
- `data::Matrix`: A Matrix object.
294294
"""
295-
function applyColumns(f::Function, data::AbstractMatrix{Float64})
295+
function applyColumns(f::F, data::AbstractMatrix{Float64}) where {F <: Function}
296296
return [f(col) for col in eachcol(data)]
297297
end
298298

0 commit comments

Comments
 (0)