Skip to content

Commit

Permalink
add a test for nested matrix multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Jul 28, 2020
1 parent fdf691e commit f00928b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DiffTests.jl
Expand Up @@ -113,10 +113,12 @@ end

self_weighted_logit(x) = inv(1.0 + exp(-dot(x, x)))

nested_array_mul(x) = sum(sum(x[1] * [[x[2], x[3]]]))

const VECTOR_TO_NUMBER_FUNCS = (vec2num_1, vec2num_2, vec2num_3, vec2num_4, vec2num_5,
vec2num_6, vec2num_7, rosenbrock_1, rosenbrock_2,
rosenbrock_3, rosenbrock_4, ackley, self_weighted_logit,
first)
nested_array_mul, first)

########################
# f(x::Matrix)::Number #
Expand Down

0 comments on commit f00928b

Please sign in to comment.