# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1635

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

**Page:** 1636

---

## [Scale axes in heatmap/plot](https://discourse.julialang.org/t/scale-axes-in-heatmap-plot/46375)

<div class="topic-metadata">

**Author:** [@marrdoc](https://discourse.julialang.org/u/marrdoc)\
**Replies:** 2\
**Last updated:** [September 10, 2020, 12:54pm UTC](https://discourse.julialang.org/t/scale-axes-in-heatmap-plot/46375 "2020-09-10T12:54:09Z")

</div>

I want to plot the magnitude of the values of a certain function with complex arguments. Thus, I created two LinRanges (for real and imaginary part) and fed the function with it to obtain a matrix. Now I plotted the fun…

---

## [Convert a percentage string (e.g. "99.8%") to Float64 when extracting data from CSV](https://discourse.julialang.org/t/convert-a-percentage-string-e-g-99-8-to-float64-when-extracting-data-from-csv/46278)

<div class="topic-metadata">

**Author:** [@alexlowth](https://discourse.julialang.org/u/alexlowth)\
**Replies:** 36\
**Last updated:** [September 10, 2020, 12:48pm UTC](https://discourse.julialang.org/t/convert-a-percentage-string-e-g-99-8-to-float64-when-extracting-data-from-csv/46278 "2020-09-10T12:48:13Z")

</div>

Hi, Does anyone know if there is a possible way to convert a percentage from a string to a Float64 when extracting data from a CSV. Or is the only way to convert the data to decimal format in excel before pulling throug…

---

## [Updating DistributedArray using the primitive DArray constructor](https://discourse.julialang.org/t/updating-distributedarray-using-the-primitive-darray-constructor/46301)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 1\
**Last updated:** [September 10, 2020, 11:55am UTC](https://discourse.julialang.org/t/updating-distributedarray-using-the-primitive-darray-constructor/46301 "2020-09-10T11:55:36Z")

</div>

The following syntax is demonstrated in the manual: DArray(size(d),procs(d)) do I ... end I haven’t seen a loop like this before. What is I?

---

## [DistributedArrays](https://discourse.julialang.org/t/distributedarrays/43377)

<div class="topic-metadata">

**Author:** [@hyacykcharel](https://discourse.julialang.org/u/hyacykcharel)\
**Replies:** 1\
**Last updated:** [September 10, 2020, 11:53am UTC](https://discourse.julialang.org/t/distributedarrays/43377 "2020-09-10T11:53:29Z")

</div>

hello! Ihave some distributedArrays to compute but i still getting error, is the any way to divide or multiplica dstributed Arrays?? using OhMyREPL using Distributed addprocs(4) @everywhere using DistributedArrays S…

---

## [How to write generic low-rank updates?](https://discourse.julialang.org/t/how-to-write-generic-low-rank-updates/46370)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 3\
**Last updated:** [September 10, 2020, 11:15am UTC](https://discourse.julialang.org/t/how-to-write-generic-low-rank-updates/46370 "2020-09-10T11:15:08Z")

</div>

I have to make computations with a low-rank update of a matrix A+uv. Is there a way to modify the statement x = A\*w + u \* (v\*w) so that it works generically for all reasonable types? u,v could be a vector and its adjo…

---

## [Recursive macro call](https://discourse.julialang.org/t/recursive-macro-call/46369)

<div class="topic-metadata">

**Author:** [@fonsp](https://discourse.julialang.org/u/fonsp)\
**Replies:** 6\
**Last updated:** [September 10, 2020, 11:13am UTC](https://discourse.julialang.org/t/recursive-macro-call/46369 "2020-09-10T11:13:29Z")

</div>

As an exercise, I’m trying to make a macro that turns @x a b c into a = b = c = 1234. I tried to write it recursively, but I don’t know how to fix my error :frowning: Definition: julia\> macro x(s::Symbol, ss...) …

---

## [Current list of colorschemes in Plots.jl](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 30\
**Last updated:** [September 10, 2020, 10:54am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420 "2020-09-10T10:54:32Z")

</div>

Is there a command to find out all the currently defined colorschemes? The one below that used to work is not working anymore: PlotUtils.\_gradients |\> keys |\> showall

---

## [Julia Function](https://discourse.julialang.org/t/julia-function/46303)

<div class="topic-metadata">

**Author:** [@hola](https://discourse.julialang.org/u/hola)\
**Replies:** 10\
**Last updated:** [September 10, 2020, 10:03am UTC](https://discourse.julialang.org/t/julia-function/46303 "2020-09-10T10:03:50Z")

</div>

hi. kindly help with this. Stuck at it for hours. How can I implement a Julia function for the product of two matrices AB via dot products, linear combination of columns, linear combination of rows and sum of outer pro…

---

## [How to assign value to a matrix in an indicator constraint](https://discourse.julialang.org/t/how-to-assign-value-to-a-matrix-in-an-indicator-constraint/46314)

<div class="topic-metadata">

**Author:** [@sogrbilja](https://discourse.julialang.org/u/sogrbilja)\
**Replies:** 15\
**Last updated:** [September 10, 2020, 9:37am UTC](https://discourse.julialang.org/t/how-to-assign-value-to-a-matrix-in-an-indicator-constraint/46314 "2020-09-10T09:37:34Z")

</div>

Is it possible and how to assign values to POSITION\[R,C\] matrix in the indicator constraint @variable(premex, ROLNA\[R in keys(\_ROWS), C in keys(\_COLS), i\_k in keys(\_IMAGES\_ALL)\], Bin) @variable(premex, POSITION…

---

## [Something's buggy with array assignment .=?](https://discourse.julialang.org/t/somethings-buggy-with-array-assignment/46356)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 6\
**Last updated:** [September 10, 2020, 9:18am UTC](https://discourse.julialang.org/t/somethings-buggy-with-array-assignment/46356 "2020-09-10T09:18:50Z")

</div>

function testnc( init::Dict,eroot::Dict; regID::AbstractString="GLB", timeID::Union{Integer,Vector}=0, gres::Real=0 ) emod,epar,ereg,etime = erainitialize( init; modID="dsfc",parID="p\_sfc…

---

## [Types vs traits for dispatch](https://discourse.julialang.org/t/types-vs-traits-for-dispatch/46296)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 7\
**Last updated:** [September 10, 2020, 7:57am UTC](https://discourse.julialang.org/t/types-vs-traits-for-dispatch/46296 "2020-09-10T07:57:00Z")

</div>

I recently learned about the Tim Holy Trait Trick as one way to dispatch on “groups” of types outside of a type hierarchy. This seems more general to me than dispatch based on type hierarchy, but I’m not sure. Are there…

---

## [Finding the "minimal" necessary type of a vector and converting to it](https://discourse.julialang.org/t/finding-the-minimal-necessary-type-of-a-vector-and-converting-to-it/46338)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 4\
**Last updated:** [September 10, 2020, 6:11am UTC](https://discourse.julialang.org/t/finding-the-minimal-necessary-type-of-a-vector-and-converting-to-it/46338 "2020-09-10T06:11:24Z")

</div>

I am having a hard time finding the “minimal” type necessary for a vector and converting to it. By “minimal” I mean the type that can still hold all of the values without being too general. For example: String \> Float64…

---

## [Fail lauching JuliaPro in ubuntu server 1804](https://discourse.julialang.org/t/fail-lauching-juliapro-in-ubuntu-server-1804/46360)

<div class="topic-metadata">

**Author:** [@GreenEric](https://discourse.julialang.org/u/GreenEric)\
**Replies:** 0\
**Last updated:** [September 10, 2020, 5:23am UTC](https://discourse.julialang.org/t/fail-lauching-juliapro-in-ubuntu-server-1804/46360 "2020-09-10T05:23:47Z")

</div>

Hi, I am new to Julia, yet quite excited about it. After successfully installed on my Win10 notebook, I eager to install it on my office ubuntu server (1804). With the instruction of \[JuliaPro Quick Start\] (https://jul…

---

## [Pivot a dataframe to wide format with values in multiple columns](https://discourse.julialang.org/t/pivot-a-dataframe-to-wide-format-with-values-in-multiple-columns/45916)

<div class="topic-metadata">

**Author:** [@Rajesh\_Talluri](https://discourse.julialang.org/u/Rajesh_Talluri)\
**Replies:** 15\
**Last updated:** [September 10, 2020, 4:03am UTC](https://discourse.julialang.org/t/pivot-a-dataframe-to-wide-format-with-values-in-multiple-columns/45916 "2020-09-10T04:03:03Z")

</div>

Hi, I am trying to perform a long to wide transformation of a data frame in Julia. The original data frame I have is: wide = DataFrame(x = 1:12, a = 2:13, b = 3:14, val1 = randn(12), val2 …

---

## [Possible bug in type inference? (4 line MWE)](https://discourse.julialang.org/t/possible-bug-in-type-inference-4-line-mwe/46353)

<div class="topic-metadata">

**Author:** [@tomohiro\_soejima](https://discourse.julialang.org/u/tomohiro_soejima)\
**Replies:** 9\
**Last updated:** [September 10, 2020, 3:17am UTC](https://discourse.julialang.org/t/possible-bug-in-type-inference-4-line-mwe/46353 "2020-09-10T03:17:11Z")

</div>

Hello! I came across a weird type inference failure when using generators. Here is a MWE. function example() col = 2 ss = (col for \_ in 1:5) col += 3 return col, ss end function example2() col = 2 …

---

## [ForwardDiff: Error ForwardDiff.Tag How to transform a Dual Type to a Float](https://discourse.julialang.org/t/forwarddiff-error-forwarddiff-tag-how-to-transform-a-dual-type-to-a-float/45884)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 9\
**Last updated:** [September 10, 2020, 2:41am UTC](https://discourse.julialang.org/t/forwarddiff-error-forwarddiff-tag-how-to-transform-a-dual-type-to-a-float/45884 "2020-09-10T02:41:10Z")

</div>

Hallo, I am struggling to get the simple derivatives works. I looked at many examples of ForwardDiff but still failed to solve my problem. I am solving a Jacobian of a Triagonal Matrix by using numerical derivatives in…

---

## [JuMP Stopped Working Today](https://discourse.julialang.org/t/jump-stopped-working-today/46348)

<div class="topic-metadata">

**Author:** [@vattyamv](https://discourse.julialang.org/u/vattyamv)\
**Replies:** 4\
**Last updated:** [September 9, 2020, 11:07pm UTC](https://discourse.julialang.org/t/jump-stopped-working-today/46348 "2020-09-09T23:07:52Z")

</div>

Hi, I’ve been using JuMP for a project and it stopped working today after I installed Gurobi. I get ERROR: LoadError: MethodError: no method matching Model(::Type{Gurobi.Optimizer}) when I set the solver to Gurobi, but i…

---

## [BetterExp 0.1.0](https://discourse.julialang.org/t/betterexp-0-1-0/44747)

<div class="topic-metadata">

**Author:** [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Replies:** 30\
**Last updated:** [September 9, 2020, 10:52pm UTC](https://discourse.julialang.org/t/betterexp-0-1-0/44747 "2020-09-09T22:52:18Z")

</div>

Do you use exp? Do you want it to be faster and (slightly) more accurate? If so, use GitHub - oscardssmith/BetterExp.jl: A faster and more accurate Exp (and Exp2, Exp10) functions for Julia.. It adds versions of exp, exp…

---

## [Ahead-Of-Time (AOT) Compiler](https://discourse.julialang.org/t/ahead-of-time-aot-compiler/14212)

<div class="topic-metadata">

**Author:** [@nordlow](https://discourse.julialang.org/u/nordlow)\
**Replies:** 6\
**Last updated:** [September 9, 2020, 9:54pm UTC](https://discourse.julialang.org/t/ahead-of-time-aot-compiler/14212 "2020-09-09T21:54:30Z")

</div>

Are there any plans for implementing an ahead-of-time-compiler in Julia that can generate standalone executables? I believe such a feature would attract a very large set of new (system) programmers typically programming…

---

## [How to properly install the OpenCV package in Julia](https://discourse.julialang.org/t/how-to-properly-install-the-opencv-package-in-julia/24619)

<div class="topic-metadata">

**Author:** [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Replies:** 3\
**Last updated:** [September 9, 2020, 5:14pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-opencv-package-in-julia/24619 "2020-09-09T17:14:00Z")

</div>

How to properly install the OpenCv package in Julia. I want to correctly install the OpenCV package in Julia, but when I install OpenCV, I get this error. ERROR: The following package names could not be resolved: Ope…

---

## [Definition of floor](https://discourse.julialang.org/t/definition-of-floor/46337)

<div class="topic-metadata">

**Author:** [@remi-garcia](https://discourse.julialang.org/u/remi-garcia)\
**Replies:** 4\
**Last updated:** [September 9, 2020, 4:50pm UTC](https://discourse.julialang.org/t/definition-of-floor/46337 "2020-09-09T16:50:52Z")

</div>

Hi, In base/float.jl I don’t understand the definition of floor: Here floor(::Type{T}, x::AbstractFloat) where {T\<:Integer} = trunc(T,round(x, RoundDown)) I don’t get the round. What I understood is: trunc(.) = round(…

---

## [Mapping functions using CuArrays](https://discourse.julialang.org/t/mapping-functions-using-cuarrays/46300)

<div class="topic-metadata">

**Author:** [@manderson](https://discourse.julialang.org/u/manderson)\
**Replies:** 2\
**Last updated:** [September 9, 2020, 4:12pm UTC](https://discourse.julialang.org/t/mapping-functions-using-cuarrays/46300 "2020-09-09T16:12:00Z")

</div>

I am attempting to map functions to the GPU using CUDA, CuArrays, and map(). My ultimate goal is to take what is currently a serial grid search and run each reduction in parallel on the GPU. For this, I need to pass a v…

---

## [Merging two git histories of two versions of a repo...?](https://discourse.julialang.org/t/merging-two-git-histories-of-two-versions-of-a-repo/46331)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 5\
**Last updated:** [September 9, 2020, 4:01pm UTC](https://discourse.julialang.org/t/merging-two-git-histories-of-two-versions-of-a-repo/46331 "2020-09-09T16:01:35Z")

</div>

Although this is not a Julia question, but a git question, I think it is likely that someone has already done something similar, given how Julia packages are git repos. Anyways, we have two versions of the package Clima…

---

## [Another successful summer of Julia!](https://discourse.julialang.org/t/another-successful-summer-of-julia/46335)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [September 9, 2020, 3:54pm UTC](https://discourse.julialang.org/t/another-successful-summer-of-julia/46335 "2020-09-09T15:54:06Z")

</div>

Hey all, We recently wrapped up another amazing summer of GSoC, JSoC, and our inaugural year participating in the MLH fellowship. Please see the blog post highlighting the success of our students here: GSoC 2020 Wrap-U…

---

## [Call for maintainers to mentor MLH Fellows](https://discourse.julialang.org/t/call-for-maintainers-to-mentor-mlh-fellows/46334)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [September 9, 2020, 3:50pm UTC](https://discourse.julialang.org/t/call-for-maintainers-to-mentor-mlh-fellows/46334 "2020-09-09T15:50:57Z")

</div>

Hey all, The Julia Language just wrapped up our inaugural year of being part of the MLH Fellowship. See here: GSoC 2020 Wrap-Up for a broad-strokes highlight. MLH (Major League Hacking) announced that they will be doin…

---

## [Best practices for testing on LTS and latest release (Travis, ...)](https://discourse.julialang.org/t/best-practices-for-testing-on-lts-and-latest-release-travis/46250)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [September 9, 2020, 3:43pm UTC](https://discourse.julialang.org/t/best-practices-for-testing-on-lts-and-latest-release-travis/46250 "2020-09-09T15:43:18Z")

</div>

Whenever a new minor version of Julia is released, I just add that version to my .travis.yml. I recently realized that this leads to a lot of testing on versions that are no longer supported. Is there a way to test on t…

---

## [What is the most performant way of bootstrapping a self-referential mutable struct?](https://discourse.julialang.org/t/what-is-the-most-performant-way-of-bootstrapping-a-self-referential-mutable-struct/46238)

<div class="topic-metadata">

**Author:** [@Lucas\_Queiroz](https://discourse.julialang.org/u/Lucas_Queiroz)\
**Replies:** 11\
**Last updated:** [September 9, 2020, 2:45pm UTC](https://discourse.julialang.org/t/what-is-the-most-performant-way-of-bootstrapping-a-self-referential-mutable-struct/46238 "2020-09-09T14:45:36Z")

</div>

Consider the self-referential struct below: mutable struct T field::T end The circularity in the way T was defined prevents me from ever constructing an object of type T. I have considered two ways out: mutable s…

---

## [What wrong ? range of cell fo String Array](https://discourse.julialang.org/t/what-wrong-range-of-cell-fo-string-array/46329)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 5\
**Last updated:** [September 9, 2020, 2:35pm UTC](https://discourse.julialang.org/t/what-wrong-range-of-cell-fo-string-array/46329 "2020-09-09T14:35:28Z")

</div>

julia\> kody5\[1\] "orbis sa 00-028 ul bracka 16 oddzial hotel aria w sosnowcu" julia\> findall(rx,kody5\[1\]) 1-element Array{UnitRange{Int64},1}: 10:15 julia\> kody5\[1\]findall(rx,kody5\[1\]) ERROR: MethodError: no method mat…

---

## [How to create a file where the columns are separated by equal space](https://discourse.julialang.org/t/how-to-create-a-file-where-the-columns-are-separated-by-equal-space/46240)

<div class="topic-metadata">

**Author:** [@Nova](https://discourse.julialang.org/u/Nova)\
**Replies:** 4\
**Last updated:** [September 9, 2020, 1:48pm UTC](https://discourse.julialang.org/t/how-to-create-a-file-where-the-columns-are-separated-by-equal-space/46240 "2020-09-09T13:48:11Z")

</div>

Here is the code I use to create the file: ar = \[\[1, 85645, 197111, 197240\], \[1, 203753\],\[1, 24\]\] loop = 0 for i =1:3#length(ar) val = ar\[i\]' .-1 print(ff, "NetDegree : ", length(val), " ", …

---

## [Why do global variables impact performance so badly?](https://discourse.julialang.org/t/why-do-global-variables-impact-performance-so-badly/46293)

<div class="topic-metadata">

**Author:** [@originalsouth](https://discourse.julialang.org/u/originalsouth)\
**Replies:** 11\
**Last updated:** [September 9, 2020, 1:39pm UTC](https://discourse.julialang.org/t/why-do-global-variables-impact-performance-so-badly/46293 "2020-09-09T13:39:22Z")

</div>

I have two almost identical codes: #!/usr/bin/env julia using Random if(length(ARGS)==1) N=parse(Int64,ARGS\[1\]) else N=1000 end function play() r=0 counter=0.0 while r\<1.0 r+=rand(Float64)…

[Previous page](https://discourse.julialang.org/latest.md?page=1634)

[Next page](https://discourse.julialang.org/latest.md?page=1636)
