# Trying to understand reported error

**URL:** https://discourse.julialang.org/t/trying-to-understand-reported-error/59523
**Category:** General Usage
**Created:** [April 18, 2021, 6:49am UTC](https://discourse.julialang.org/t/trying-to-understand-reported-error/59523 "2021-04-18T06:49:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![quazirfan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quazirfan/32/23381_2.png) [@quazirfan](https://discourse.julialang.org/u/quazirfan)
#### Post date: [April 18, 2021, 6:49am UTC](https://discourse.julialang.org/t/trying-to-understand-reported-error/59523/1 "2021-04-18T06:49:43Z")

</div>

I am trying to solve [Temperature Variation](https://projectlovelace.net/problems/temperature-variations/) problem on Project Lovelace.

The problem is given a list of numbers, find the mean and standard deviation. I have written the following code,

```julia
function temperature_statistics(T)
    mean = sum(T)/length(T)
    std = sqrt(sum((T .- mean).^2)/length(T))
    return mean, std
end

```

The code appears correct to me, but the when I try to submit it I get the following error,

```julia
ERROR: LoadError: MethodError: no method matching Array{Float64,1}(::Array{Float64,2})

You might have used a 2d row vector where a 1d column vector was required.
Note the difference between 1d column vector [1,2,3] and 2d row vector [1 2 3].
You can convert to a column vector with the vec() function.
Closest candidates are:
  Array{Float64,1}(::AbstractArray{S,N}) where {T, N, S} at array.jl:562
  Array{Float64,1}() where T at boot.jl:425
  Array{Float64,1}(!Matched::UndefInitializer, !Matched::Int64) where T at boot.jl:406
  ...
Stacktrace:
 [1] convert(::Type{Array{Float64,1}}, ::Array{Float64,2}) at ./array.jl:554
 [2] juliafy_json(::Array{Any,1}) at /root/88e8d876243adc5179c2a982d1750704acbbd495.jl:30
 [3] iterate at ./generator.jl:47 [inlined]
 [4] collect(::Base.Generator{Array{Any,1},typeof(juliafy_json)}) at ./array.jl:686
 [5] top-level scope at /root/88e8d876243adc5179c2a982d1750704acbbd495.jl:39
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] exec_options(::Base.JLOptions) at ./client.jl:296
 [9] _start() at ./client.jl:506

```

Now, the thing that stands out to me is in this error is this part `no method matching Array{Float64,1}(::Array{Float64,2})`

Am I correct to assume that the auto test engine is expecting a function that takes a `Array{Float64,1}` and returns a `Array{Float64,2}`? If that’s true, then changing the return statement to `return [mean, std]` would solve the issue, right? But it didn’t.

Where do you guys think the problem is?

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [April 18, 2021, 9:14am UTC](https://discourse.julialang.org/t/trying-to-understand-reported-error/59523/2 "2021-04-18T09:14:46Z")

</div>

We probably need a full minimum working example to help with this, where we know what `T` is.

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [April 18, 2021, 9:18am UTC](https://discourse.julialang.org/t/trying-to-understand-reported-error/59523/3 "2021-04-18T09:18:38Z")

</div>

I checked with [Temperature variations | Project Lovelace](https://projectlovelace.net/problems/temperature-variations/) and get the same error (no matter what I do). So I suspect an error on the project system and expect that you can’t do anything.

You may try to send a note to the maintainer of project lovelace and make them aware of this issue.

---

<div class="post-metadata">

### Author: ![quazirfan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quazirfan/32/23381_2.png) [@quazirfan](https://discourse.julialang.org/u/quazirfan)
#### Post date: [April 18, 2021, 9:25am UTC](https://discourse.julialang.org/t/trying-to-understand-reported-error/59523/4 "2021-04-18T09:25:36Z")

</div>

Thanks, reported to the maintainer.
