Skip to content

Fix 0.6 abstract type declaration depwarn #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
julia 0.5
Compat 0.13.0
DataStructures 0.5.0
Compat 0.17.0
DataStructures 0.5.0
7 changes: 4 additions & 3 deletions perf/sampling.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Benchmark on non-weighted sampling
# Benchmark on non-weighted sampling

# require the BenchmarkLite package
using BenchmarkLite
using StatsBase
using Compat

import StatsBase: direct_sample!, xmultinom_sample!
import StatsBase: knuths_sample!, fisher_yates_sample!, self_avoid_sample!
Expand All @@ -12,8 +13,8 @@ import StatsBase: seqsample_a!, seqsample_c!

type SampleProc{Alg} <: Proc end

abstract WithRep
abstract NoRep
@compat abstract type WithRep end
@compat abstract type NoRep end

type Direct <: WithRep end
tsample!(s::Direct, a, x) = direct_sample!(a, x)
Expand Down
5 changes: 3 additions & 2 deletions perf/wsampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

using BenchmarkLite
using StatsBase
using Compat

import StatsBase: direct_sample!, alias_sample!, xmultinom_sample!

### procedure definition

type WSampleProc{Alg} <: Proc end

abstract WithRep
abstract NoRep
@compat abstract type WithRep end
@compat abstract type NoRep end

type Direct <: WithRep end
tsample!(s::Direct, wv, x) = direct_sample!(1:length(wv), wv, x)
Expand Down
2 changes: 1 addition & 1 deletion src/hist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function sturges(n) # Sturges' formula
ceil(Integer, log2(n))+1
end

abstract AbstractHistogram{T<:Real,N,E}
@compat abstract type AbstractHistogram{T<:Real,N,E} end

# N-dimensional histogram object
type Histogram{T<:Real,N,E} <: AbstractHistogram{T,N,E}
Expand Down
4 changes: 2 additions & 2 deletions src/statmodels.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Statistical Models

abstract StatisticalModel
@compat abstract type StatisticalModel end

coef(obj::StatisticalModel) = error("coef is not defined for $(typeof(obj)).")
coeftable(obj::StatisticalModel) = error("coeftable is not defined for $(typeof(obj)).")
Expand Down Expand Up @@ -145,7 +145,7 @@ end

const adjr² = adjr2

abstract RegressionModel <: StatisticalModel
@compat abstract type RegressionModel <: StatisticalModel end

fitted(obj::RegressionModel) = error("fitted is not defined for $(typeof(obj)).")
model_response(obj::RegressionModel) = error("model_response is not defined for $(typeof(obj)).")
Expand Down