Skip to content

Commit

Permalink
fix type piracy
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoStrouwen committed Dec 28, 2023
1 parent 8c3659c commit fb53ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Radials.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using LinearAlgebra
using ExtendableSparse

Base.copy(t::Tuple) = t
_copy(t::Tuple) = t
_copy(t) = copy(t)

mutable struct RadialBasis{F, Q, X, Y, L, U, C, S, D} <: AbstractSurrogate
phi::F
Expand Down Expand Up @@ -58,9 +59,9 @@ function _calc_coeffs(x, y, lb, ub, phi, q, scale_factor, sparse)
D = _construct_rbf_interp_matrix(x, first(x), lb, ub, phi, q, scale_factor, sparse)
Y = _construct_rbf_y_matrix(y, first(y), length(y) + num_poly_terms)
if (typeof(y) == Vector{Float64}) #single output case
coeff = copy(transpose(D \ y))
coeff = _copy(transpose(D \ y))
else
coeff = copy(transpose(D \ Y[1:size(D)[1], :])) #if y is multi output;
coeff = _copy(transpose(D \ Y[1:size(D)[1], :])) #if y is multi output;
end
return coeff
end
Expand Down
2 changes: 1 addition & 1 deletion test/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Surrogates, Aqua
Aqua.find_persistent_tasks_deps(Surrogates)
Aqua.test_ambiguities(Surrogates, recursive = false)
Aqua.test_deps_compat(Surrogates)
Aqua.test_piracies(Surrogates, broken = true)
Aqua.test_piracies(Surrogates)
Aqua.test_project_extras(Surrogates)
Aqua.test_stale_deps(Surrogates)
Aqua.test_unbound_args(Surrogates)
Expand Down

0 comments on commit fb53ec7

Please sign in to comment.