# \#faq

**URL:** https://discourse.julialang.org/tag/faq/9.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [A proper introduction on how to update julia somewhere accessible?](https://discourse.julialang.org/t/a-proper-introduction-on-how-to-update-julia-somewhere-accessible/28166)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 14\
**Last updated:** [March 19, 2025, 9:44am UTC](https://discourse.julialang.org/t/a-proper-introduction-on-how-to-update-julia-somewhere-accessible/28166 "2025-03-19T09:44:48Z")

</div>

So I recently had to update Julia. After some hand-holding from a colleague it worked out. I’ve had to do this two times before, the first time it worked out fine after someone at JuliaCon did it for me. The second time …

---

## [Python to Julia transpiler](https://discourse.julialang.org/t/python-to-julia-transpiler/21473)

<div class="topic-metadata">

**Author:** [@kiwi0fruit](https://discourse.julialang.org/u/kiwi0fruit)\
**Replies:** 13\
**Last updated:** [August 3, 2021, 5:35am UTC](https://discourse.julialang.org/t/python-to-julia-transpiler/21473 "2021-08-03T05:35:32Z")

</div>

https://github.com/JuliaLang/Juleps/issues/55

---

## [No method matching getindex() using ODEProblem](https://discourse.julialang.org/t/no-method-matching-getindex-using-odeproblem/61361)

<div class="topic-metadata">

**Author:** [@Fabio](https://discourse.julialang.org/u/Fabio)\
**Replies:** 6\
**Last updated:** [May 18, 2021, 8:18pm UTC](https://discourse.julialang.org/t/no-method-matching-getindex-using-odeproblem/61361 "2021-05-18T20:18:44Z")

</div>

Hey there, I am very new to Julia and I am working on an ODE Problem. Basically this is my set-up: etaspan = (0.0, 1.0) F0 = \[1, -1e+10, q\_, 0\] function eventfcn(vcondition, value, eta, integrator) out\[1\] = (qma…

---

## [High view description of the folders in .julia?](https://discourse.julialang.org/t/high-view-description-of-the-folders-in-julia/20506)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 8\
**Last updated:** [July 14, 2020, 4:39am UTC](https://discourse.julialang.org/t/high-view-description-of-the-folders-in-julia/20506 "2020-07-14T04:39:06Z")

</div>

Hello, where can I find a discussion, possibly user-centered, about the folders inside .jullia ? I have the following folders: clones compiled conda dev environments logs packages prefs registries What’s the role of …

---

## [LinearIndices for non-1-based indices](https://discourse.julialang.org/t/linearindices-for-non-1-based-indices/26906)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 5\
**Last updated:** [August 17, 2019, 11:59pm UTC](https://discourse.julialang.org/t/linearindices-for-non-1-based-indices/26906 "2019-08-17T23:59:34Z")

</div>

I’m not sure if I understand LinearIndices and CartesianIndices correctly, but I think they provide a mapping between those index types, and are inverses of each other? This seems to be the case for normal 1-based indic…

---

## [When is it necessary to qualify names](https://discourse.julialang.org/t/when-is-it-necessary-to-qualify-names/25378)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 2\
**Last updated:** [June 18, 2019, 3:38am UTC](https://discourse.julialang.org/t/when-is-it-necessary-to-qualify-names/25378 "2019-06-18T03:38:33Z")

</div>

I am having trouble figuring out when I need to qualify names or use modules and when I don’t. \* seems to do matrix multiplication even though I haven’t even issued using LinearAlgebra. optimize worked after using Op…

---

## [How hard would it be to implement Numpy.jl, i.e. Numpy in Julia?](https://discourse.julialang.org/t/how-hard-would-it-be-to-implement-numpy-jl-i-e-numpy-in-julia/22080)

<div class="topic-metadata">

**Author:** [@Pierre\_Augier](https://discourse.julialang.org/u/Pierre_Augier)\
**Replies:** 71\
**Last updated:** [May 9, 2019, 2:24pm UTC](https://discourse.julialang.org/t/how-hard-would-it-be-to-implement-numpy-jl-i-e-numpy-in-julia/22080 "2019-05-09T14:24:12Z")

</div>

Hi, I’m working with Pythran (http://github.com/serge-sans-paille/pythran), a Python/Numpy to C++ transpiler, which of course supports only a subset of Python (in particular not all the crazy cool Python stuffs stupid f…

---

## [Unique() to a certain tolerance?](https://discourse.julialang.org/t/unique-to-a-certain-tolerance/23007)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 10\
**Last updated:** [April 11, 2019, 11:07am UTC](https://discourse.julialang.org/t/unique-to-a-certain-tolerance/23007 "2019-04-11T11:07:08Z")

</div>

Hi all, I’m building up a code that evaluates the energy of a lot of spin states, and many of those states have the same energy. Typically about 2^20 different states, but only a few thousand of them have different ener…

---

## [Convert Matlab Code to Julia 1.0](https://discourse.julialang.org/t/convert-matlab-code-to-julia-1-0/21529)

<div class="topic-metadata">

**Author:** [@Aquaman](https://discourse.julialang.org/u/Aquaman)\
**Replies:** 22\
**Last updated:** [April 8, 2019, 9:35am UTC](https://discourse.julialang.org/t/convert-matlab-code-to-julia-1-0/21529 "2019-04-08T09:35:26Z")

</div>

Dear all, I want to ask, which best tool that I can convert Matlab code to Julia, now some tools are not supported any more in GitHub…… Best regards

---

## [REPL's own scope](https://discourse.julialang.org/t/repls-own-scope/21365)

<div class="topic-metadata">

**Author:** [@jeffe](https://discourse.julialang.org/u/jeffe)\
**Replies:** 3\
**Last updated:** [March 3, 2019, 7:31pm UTC](https://discourse.julialang.org/t/repls-own-scope/21365 "2019-03-03T19:31:45Z")

</div>

Sorry for the new thread, trying not to litter @StefanKarpinski 's new scope solution, which this tangents from. Just two simple questions. I come to Julia with an understanding of scope in other languages, but… Th…

---

## [Is it safe to compare rounded float values for equality?](https://discourse.julialang.org/t/is-it-safe-to-compare-rounded-float-values-for-equality/21278)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 11\
**Last updated:** [February 28, 2019, 6:32am UTC](https://discourse.julialang.org/t/is-it-safe-to-compare-rounded-float-values-for-equality/21278 "2019-02-28T06:32:40Z")

</div>

I know that comparing two floats for equality using == is not a good idea, as it can yield unexpected results. For example, 0.1 + 0.2 == 0.3 returns false. I understand that there is an isapprox function to deal with thi…

---

## [I can not understand the meaning of this sentence on the doc](https://discourse.julialang.org/t/i-can-not-understand-the-meaning-of-this-sentence-on-the-doc/21010)

<div class="topic-metadata">

**Author:** [@achitsaz](https://discourse.julialang.org/u/achitsaz)\
**Replies:** 4\
**Last updated:** [February 20, 2019, 3:38pm UTC](https://discourse.julialang.org/t/i-can-not-understand-the-meaning-of-this-sentence-on-the-doc/21010 "2019-02-20T15:38:09Z")

</div>

Hi everyone I’m new to programming. Julia is the first language I learn in principle. I do not understand the meaning of the following text. If you please and explain to me, I will be grateful. The size of the binary…

---

## [Setproperty!/getproperty and broadcasting do not seem to work together](https://discourse.julialang.org/t/setproperty-getproperty-and-broadcasting-do-not-seem-to-work-together/19907)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 7\
**Last updated:** [January 22, 2019, 8:30pm UTC](https://discourse.julialang.org/t/setproperty-getproperty-and-broadcasting-do-not-seem-to-work-together/19907 "2019-01-22T20:30:30Z")

</div>

I can not make object.property .+= value work where property is implemented in setproperty!. Here is example code: struct MyStruct an\_array::Array{Int,1} end function Base.getproperty(s::MyStruct, name::Symbol) …

---

## [Constructors for Primitive types](https://discourse.julialang.org/t/constructors-for-primitive-types/19139)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 5\
**Last updated:** [December 31, 2018, 9:25pm UTC](https://discourse.julialang.org/t/constructors-for-primitive-types/19139 "2018-12-31T21:25:31Z")

</div>

My goal is to have my own primitive integer type, for which I need to specialize dispatch. primitive type Basis{V,G} \<: Unsigned 16 end How do I create a constructor for it? The documentation does not explain how. jul…

---

## [Possible bug in unique/Set](https://discourse.julialang.org/t/possible-bug-in-unique-set/5371)

<div class="topic-metadata">

**Author:** [@CrashBurnRepeat](https://discourse.julialang.org/u/CrashBurnRepeat)\
**Replies:** 49\
**Last updated:** [June 15, 2018, 11:30am UTC](https://discourse.julialang.org/t/possible-bug-in-unique-set/5371 "2018-06-15T11:30:29Z")

</div>

I’ve been using unique as part of code that does partial fractional decomposition. Because of the numerical nature of the problem, I sometimes get arrays like: 4-element Array{Complex{Float64},1}: 1.0-0.0im 1.0+0.0im …

---

## [How to get 0.7.0-DEV.4652 from commit hash?](https://discourse.julialang.org/t/how-to-get-0-7-0-dev-4652-from-commit-hash/9859)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 3\
**Last updated:** [March 21, 2018, 8:28pm UTC](https://discourse.julialang.org/t/how-to-get-0-7-0-dev-4652-from-commit-hash/9859 "2018-03-21T20:28:12Z")

</div>

I think I have seen this but I can’t find it now. I want to check for Julia versions where the second form from Warning: \`sum(a::AbstractArray, dims)\` is deprecated, use \`sum(a, dims=dims)\` instead. is valid. The com…

---

## [Literal representation of Array{T,2} when the array is nx1](https://discourse.julialang.org/t/literal-representation-of-array-t-2-when-the-array-is-nx1/8821)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 6\
**Last updated:** [February 6, 2018, 5:09pm UTC](https://discourse.julialang.org/t/literal-representation-of-array-t-2-when-the-array-is-nx1/8821 "2018-02-06T17:09:45Z")

</div>

tl;dr How do a write a nx1 array literally such that it is an Array{T,2} ? This all started when I tried to do the following, julia\> Array{UInt32,2}(\[1,2\]) ERROR: MethodError: Cannot \`convert\` an object of type Array{…

---

## [GPL and virality](https://discourse.julialang.org/t/gpl-and-virality/7715)

<div class="topic-metadata">

**Author:** [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Replies:** 39\
**Last updated:** [December 20, 2017, 10:13pm UTC](https://discourse.julialang.org/t/gpl-and-virality/7715 "2017-12-20T22:13:06Z")

</div>

It’s often stated that the GPL is “viral” – i.e. that using GPL code “infects” other code. There is a viral effect for code that is not licensed under a GPL-compatible license, but not for code that is licensed under a G…

---

## [Guide/Reference for migrating packages from 0.5 to 0.6?](https://discourse.julialang.org/t/guide-reference-for-migrating-packages-from-0-5-to-0-6/3967)

<div class="topic-metadata">

**Author:** [@Sebastien\_Arnaud](https://discourse.julialang.org/u/Sebastien_Arnaud)\
**Replies:** 4\
**Last updated:** [May 29, 2017, 1:45pm UTC](https://discourse.julialang.org/t/guide-reference-for-migrating-packages-from-0-5-to-0-6/3967 "2017-05-29T13:45:48Z")

</div>

Hi, is there a comprehensive guide to help migrate packages from 0.5 to 0.6? I am personally looking at helping migrate this package: https://github.com/jaak-s/BayesianDataFusion.jl But I am getting the following error…

---

## [\`Float\` type like \`Int\` type](https://discourse.julialang.org/t/float-type-like-int-type/1164)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 29\
**Last updated:** [March 14, 2017, 12:32am UTC](https://discourse.julialang.org/t/float-type-like-int-type/1164 "2017-03-14T00:32:13Z")

</div>

I find myself always writing a type alias for floating points in order to make my package neutral to machine word size: typealias Float Float64 Why there is no definition like Int that becomes Int64 or Int32 depending …

---

## [Looping over variable names inside a function](https://discourse.julialang.org/t/looping-over-variable-names-inside-a-function/2629)

<div class="topic-metadata">

**Author:** [@dpo](https://discourse.julialang.org/u/dpo)\
**Replies:** 2\
**Last updated:** [March 13, 2017, 5:52am UTC](https://discourse.julialang.org/t/looping-over-variable-names-inside-a-function/2629 "2017-03-13T05:52:31Z")

</div>

I’m trying to write what I thought should be a simple loop over local variables names inside a function for debugging purposes. The pattern is very simple: function myfunction(args...; kwargs...) x, y, z = other\_func…

---

## [Inspect parameter type in container-like class](https://discourse.julialang.org/t/inspect-parameter-type-in-container-like-class/1492)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 7\
**Last updated:** [January 15, 2017, 4:51pm UTC](https://discourse.julialang.org/t/inspect-parameter-type-in-container-like-class/1492 "2017-01-15T16:51:58Z")

</div>

I have a very common problem for which I still don’t have a clear solution in Julia: abstract AbstractFoo{N,T} dimension{N,T}(::AbstractFoo{N,T}) = N coordtype{N,T}(::AbstractFoo{N,T}) = T abstract AbstractContainer{F}…

---

## [Overwriting functions](https://discourse.julialang.org/t/overwriting-functions/404)

<div class="topic-metadata">

**Author:** [@akis](https://discourse.julialang.org/u/akis)\
**Replies:** 7\
**Last updated:** [November 22, 2016, 11:53pm UTC](https://discourse.julialang.org/t/overwriting-functions/404 "2016-11-22T23:53:13Z")

</div>

Note: This post is intended as a FAQ entry in wiki format to get improved by the community. Relevant pages of the Julia Documentation: Functions, Methods Relevant Julia principles by design: Different types get diffe…

---

## [How slow push! is?](https://discourse.julialang.org/t/how-slow-push-is/424)

<div class="topic-metadata">

**Author:** [@pint](https://discourse.julialang.org/u/pint)\
**Replies:** 3\
**Last updated:** [November 18, 2016, 11:36pm UTC](https://discourse.julialang.org/t/how-slow-push-is/424 "2016-11-18T23:36:28Z")

</div>

suppose you need to build an array of unknown size. elements come in one by one, then an eof comes. the question is, how bad push!() is from performance viewpoint? the performant way to do this is to preallocate the arra…
