# Array{Float64}(undef, X) gives wrong results

**URL:** https://discourse.julialang.org/t/array-float64-undef-x-gives-wrong-results/28991
**Category:** General Usage
**Tags:** bug
**Created:** [September 20, 2019, 9:36am UTC](https://discourse.julialang.org/t/array-float64-undef-x-gives-wrong-results/28991 "2019-09-20T09:36:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [September 20, 2019, 9:42am UTC](https://discourse.julialang.org/t/array-float64-undef-x-gives-wrong-results/28991/2 "2019-09-20T09:42:34Z")

</div>

> [@JosephPollacco](#):
>
> So my understanding is that there is a _ **bug in Array.** _

While that is theoretically possible, it is much more likely that there is a bug in your code — you fail to overwrite some elements, and an `Array{T}(undef, ...)` can have random memory contents.

Isolating an MWE would be helpful, try to simplify your problem so that you can post it here.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

_[View the full topic](https://discourse.julialang.org/t/array-float64-undef-x-gives-wrong-results/28991)._
