# Latest

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

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

**Page:** 1869

---

## [Pyomo style "blocks" in JuMP](https://discourse.julialang.org/t/pyomo-style-blocks-in-jump/31849)

<div class="topic-metadata">

**Author:** [@jonmat](https://discourse.julialang.org/u/jonmat)\
**Replies:** 7\
**Last updated:** [December 5, 2019, 3:06pm UTC](https://discourse.julialang.org/t/pyomo-style-blocks-in-jump/31849 "2019-12-05T15:06:17Z")

</div>

I’m new to Julia/JuMP and I’m wondering if Julia has any capability that replicates “blocks” in Pyomo? In other words the possibility to maintain separate namespaces within your model, and build hierarchical/compositiona…

---

## [Julia Pro can't install packages](https://discourse.julialang.org/t/julia-pro-cant-install-packages/30333)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 2:40pm UTC](https://discourse.julialang.org/t/julia-pro-cant-install-packages/30333 "2019-12-05T14:40:24Z")

</div>

I just re-installed JuliaPro - that was working before - and now when I try to add a package I get this error Updating git-repo \`https://pkg.juliacomputing.com//registry/JuliaPro\` ERROR: GitError(Code:EMERGECONFLICT, Cl…

---

## [Infinite recursion kills Julia instead of stackoverflowing](https://discourse.julialang.org/t/infinite-recursion-kills-julia-instead-of-stackoverflowing/31819)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 6\
**Last updated:** [December 5, 2019, 2:35pm UTC](https://discourse.julialang.org/t/infinite-recursion-kills-julia-instead-of-stackoverflowing/31819 "2019-12-05T14:35:40Z")

</div>

This is fine julia\> function recur(var::String) recur("Ai") end recur (generic function with 1 method) julia\> recur("ai") ERROR: StackOverflowError: Stacktrace: \[1\] recur(::String) at .\\REPL\[2\]:2 (repeat…

---

## [Type annotation make JIT compile faster?](https://discourse.julialang.org/t/type-annotation-make-jit-compile-faster/31906)

<div class="topic-metadata">

**Author:** [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 2:11pm UTC](https://discourse.julialang.org/t/type-annotation-make-jit-compile-faster/31906 "2019-12-05T14:11:11Z")

</div>

I have a very simple question about Julia itself. Does type annotation for function make JIT compile faster? In other words, Should I add type annotations as much as possible for good JIT compile performance? Best

---

## [Add single point to plot using Plots pyplot()](https://discourse.julialang.org/t/add-single-point-to-plot-using-plots-pyplot/31886)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 12:57pm UTC](https://discourse.julialang.org/t/add-single-point-to-plot-using-plots-pyplot/31886 "2019-12-05T12:57:04Z")

</div>

Hi, I would like to add a point to a graph, like a heatmap. It works fine if I do plot!(\[1.\],\[1.\],color="blue") but if use plot!(\[a.\],\[a.\],color="blue") where a is a variable Int64, I get the error unexpected \]. Re…

---

## [Linear interpolations of (langitude, latitude, altitude) triples?](https://discourse.julialang.org/t/linear-interpolations-of-langitude-latitude-altitude-triples/31903)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 0\
**Last updated:** [December 5, 2019, 12:50pm UTC](https://discourse.julialang.org/t/linear-interpolations-of-langitude-latitude-altitude-triples/31903 "2019-12-05T12:50:53Z")

</div>

I hope this is a right place to ask this question. mutable struct LLA lat::Float64 lon::Float64 alt::Float64 end LLA(lat, lon) = LLA(lat, lon, 0.0) function linearInterpolation(startLoc::LLA, endLoc::LLA, f…

---

## [GPUparallelisation on Intel card?](https://discourse.julialang.org/t/gpuparallelisation-on-intel-card/31843)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 12:41pm UTC](https://discourse.julialang.org/t/gpuparallelisation-on-intel-card/31843 "2019-12-05T12:41:06Z")

</div>

Hello, is GPU parallelisation reserved to CUDarray/NVIDIA cards, or is there an API for generic (i.e. Intel integrated) cards ? And if yes, is it worth it? Where could I get more doc/info about it ?

---

## [Macro in function scope](https://discourse.julialang.org/t/macro-in-function-scope/31858)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 9\
**Last updated:** [December 5, 2019, 12:13pm UTC](https://discourse.julialang.org/t/macro-in-function-scope/31858 "2019-12-05T12:13:02Z")

</div>

Wow, I’ve been spending the last few days trying to understand metaprogramming in Julia and specifically Macros. Not much luck! Take the code below: a = "p \> 0.5" function test(a) for p in \[0,1,2\] if @my\_macro(…

---

## [Plots.jl: Assigning seriescolor using ColorGradient for line plot](https://discourse.julialang.org/t/plots-jl-assigning-seriescolor-using-colorgradient-for-line-plot/17099)

<div class="topic-metadata">

**Author:** [@Micah\_BL](https://discourse.julialang.org/u/Micah_BL)\
**Replies:** 14\
**Last updated:** [December 5, 2019, 11:58am UTC](https://discourse.julialang.org/t/plots-jl-assigning-seriescolor-using-colorgradient-for-line-plot/17099 "2019-12-05T11:58:40Z")

</div>

I am having trouble using a ColorGradient to set the color levels of a dynamic number of series. I can get the colorgradient to work if I use heatmap: A = \[i for i=1:100, j=1:100\] heatmap(A, c=ColorGradient(:inferno)) …

---

## [Writing functions for types defined in another module](https://discourse.julialang.org/t/writing-functions-for-types-defined-in-another-module/31895)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 5\
**Last updated:** [December 5, 2019, 11:51am UTC](https://discourse.julialang.org/t/writing-functions-for-types-defined-in-another-module/31895 "2019-12-05T11:51:51Z")

</div>

I want to have type definitions in one module module1 and then write functions that operate on my type in another module module2 and use these functions and the type in my main script / REPL. But in my current setup I th…

---

## [Update the last line while writing the current line during writing to a file in julia](https://discourse.julialang.org/t/update-the-last-line-while-writing-the-current-line-during-writing-to-a-file-in-julia/31899)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [December 5, 2019, 11:33am UTC](https://discourse.julialang.org/t/update-the-last-line-while-writing-the-current-line-during-writing-to-a-file-in-julia/31899 "2019-12-05T11:33:09Z")

</div>

Hi. I need to create a file with four columns, say startTimes, startLocs, routeNds, and edgesTravelTimes. Because each column has different length, I figured that I can only use a normal txt file, or a csv file, without …

---

## [Pkg doesn't seem to work so well under 1.3](https://discourse.julialang.org/t/pkg-doesnt-seem-to-work-so-well-under-1-3/31898)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 11:30am UTC](https://discourse.julialang.org/t/pkg-doesnt-seem-to-work-so-well-under-1-3/31898 "2019-12-05T11:30:45Z")

</div>

just upgrade to 1.3 from 1.1.1, I did an “update” under Pkg, but nothing happened though I had quite many packages installed under 1.1 (and I have not been up to date for a few months). “status” doesn’t show any existin…

---

## [Is there a way to define custom Zygote adjoints for only some arguments of a function?](https://discourse.julialang.org/t/is-there-a-way-to-define-custom-zygote-adjoints-for-only-some-arguments-of-a-function/31884)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 1\
**Last updated:** [December 5, 2019, 11:08am UTC](https://discourse.julialang.org/t/is-there-a-way-to-define-custom-zygote-adjoints-for-only-some-arguments-of-a-function/31884 "2019-12-05T11:08:35Z")

</div>

Suppose I have some function for which I define custom Zygote adjoints, but the gradient for some of the arguments I don’t need yet and I’d like to leave to implement later. Currently, I could define that adjoint to retu…

---

## [Map and mapreduce with Threads](https://discourse.julialang.org/t/map-and-mapreduce-with-threads/31861)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [December 5, 2019, 9:39am UTC](https://discourse.julialang.org/t/map-and-mapreduce-with-threads/31861 "2019-12-05T09:39:22Z")

</div>

I would like to experiment with parallelizing an embarrassingly parallel computation on an iterable using the new multithreading in 1.3. I need map and mapreduce. I would prefer to leave return type determination to Jul…

---

## [Documentation of eachindex](https://discourse.julialang.org/t/documentation-of-eachindex/31607)

<div class="topic-metadata">

**Author:** [@emmt](https://discourse.julialang.org/u/emmt)\
**Replies:** 1\
**Last updated:** [December 5, 2019, 7:10am UTC](https://discourse.julialang.org/t/documentation-of-eachindex/31607 "2019-12-05T07:10:52Z")

</div>

I find the documentation of eachindex a bit confusing when is says that: If the arrays have different sizes and/or dimensionalities, eachindex will return an iterable that spans the largest range along each dimension. …

---

## ["Pkg.resolve()" problems](https://discourse.julialang.org/t/pkg-resolve-problems/31793)

<div class="topic-metadata">

**Author:** [@Aquaman](https://discourse.julialang.org/u/Aquaman)\
**Replies:** 2\
**Last updated:** [December 3, 2019, 12:57pm UTC](https://discourse.julialang.org/t/pkg-resolve-problems/31793 "2019-12-03T12:57:40Z")

</div>

Hello everybody, I cannot solve this problem using “Pkg.resolve()”. LoadError: ArgumentError: Package FEMBasis does not have Tensors in its dependencies: If you have FEMBasis checked out for development and have ad…

---

## [Matrix interpolations](https://discourse.julialang.org/t/matrix-interpolations/31888)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 1\
**Last updated:** [December 5, 2019, 5:36am UTC](https://discourse.julialang.org/t/matrix-interpolations/31888 "2019-12-05T05:36:28Z")

</div>

I’m trying out Interpolations.jl for matrix-valued data, for this example Linear runs but Cubic fails. using LinearAlgebra using Interpolations f(t) = \[cos(t) -sin(t); sin(t)\*im cos(t)\] ts = 0:.01:2\*pi fs = \[f(ti) for…

---

## [Can't add Zygote in Julia 1.3](https://discourse.julialang.org/t/cant-add-zygote-in-julia-1-3/31870)

<div class="topic-metadata">

**Author:** [@vavrines](https://discourse.julialang.org/u/vavrines)\
**Replies:** 8\
**Last updated:** [December 5, 2019, 3:51am UTC](https://discourse.julialang.org/t/cant-add-zygote-in-julia-1-3/31870 "2019-12-05T03:51:12Z")

</div>

When I tried to add Zygote.jl into Julia 1.3, it reported the following issues. Any ideas on how to solve it? Thanks :slight\_smile: (v1.3) pkg\> add Zygote Updating registry at \`~/.julia/registries/General\` Updatin…

---

## [Base.getfield() gives warntype?](https://discourse.julialang.org/t/base-getfield-gives-warntype/31845)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 5\
**Last updated:** [December 5, 2019, 3:26am UTC](https://discourse.julialang.org/t/base-getfield-gives-warntype/31845 "2019-12-05T03:26:48Z")

</div>

I have a quite complicated parametric type that contains a simple Int64 field like: struct A{T, U, V, W, X, Y} n::Int64 ... (a lot of other possibly parametric-typed fields) end a = A(3, .....) when I try to d…

---

## [Has anyone taken this course on probabilistic programming in Julia?](https://discourse.julialang.org/t/has-anyone-taken-this-course-on-probabilistic-programming-in-julia/31867)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 6\
**Last updated:** [December 5, 2019, 2:41am UTC](https://discourse.julialang.org/t/has-anyone-taken-this-course-on-probabilistic-programming-in-julia/31867 "2019-12-05T02:41:27Z")

</div>

The course is here: https://www.udemy.com/course/probabilistic-programming-with-python-and-julia/ It has only had 34 students and the ratings are quite poor (so my prior belief about the probability of finding someone …

---

## [Unexpected subtyping behavior \<:](https://discourse.julialang.org/t/unexpected-subtyping-behavior/31701)

<div class="topic-metadata">

**Author:** [@holylorenzo](https://discourse.julialang.org/u/holylorenzo)\
**Replies:** 2\
**Last updated:** [November 30, 2019, 8:58pm UTC](https://discourse.julialang.org/t/unexpected-subtyping-behavior/31701 "2019-11-30T20:58:17Z")

</div>

Hey everyone, could someone explain this subtyping behavior to me? It does not seem intuitive to me. Array{T where T} \<: AbstractArray{T where T} # true Array{Array{T where T}} \<: AbstractArray{Array{T where T}} # al…

---

## [Threads.@threads and BitArrays](https://discourse.julialang.org/t/threads-threads-and-bitarrays/31878)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 3\
**Last updated:** [December 4, 2019, 11:54pm UTC](https://discourse.julialang.org/t/threads-threads-and-bitarrays/31878 "2019-12-04T23:54:59Z")

</div>

Issue https://github.com/JuliaLang/julia/issues/33750 is about BitArrays not being threadsafe. My reading: changing elements of a BitArray inside a Threads.@threads for loop can give unpredictable results. My question i…

---

## [Has anyone used log axes in GR?](https://discourse.julialang.org/t/has-anyone-used-log-axes-in-gr/31836)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 4\
**Last updated:** [December 4, 2019, 10:53pm UTC](https://discourse.julialang.org/t/has-anyone-used-log-axes-in-gr/31836 "2019-12-04T22:53:26Z")

</div>

I tried doing the following: using GR x = 1:100 y = abs.(randn(100)) setscale(GR.OPTION\_X\_LOG) plot(x,y) readline() and no logarithmic x-axis. i thought i was crazy, so i looked for an example that used a log axis an…

---

## [Form encoded data](https://discourse.julialang.org/t/form-encoded-data/31869)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 0\
**Last updated:** [December 4, 2019, 7:51pm UTC](https://discourse.julialang.org/t/form-encoded-data/31869 "2019-12-04T19:51:24Z")

</div>

How can I reproduce this python code with HTTP.jl? url = 'https://myurl.com/api' params = {'par': val} headers = {'Content-Type': 'application/x-www-form-urlencoded'} with open(filename, 'rb') as f: r = requests.pos…

---

## [How to debug compilation time and loading time of packages?](https://discourse.julialang.org/t/how-to-debug-compilation-time-and-loading-time-of-packages/31583)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 4\
**Last updated:** [December 4, 2019, 7:33pm UTC](https://discourse.julialang.org/t/how-to-debug-compilation-time-and-loading-time-of-packages/31583 "2019-12-04T19:33:50Z")

</div>

While waiting for general improvements in compile and load times (cf. comment in Roadmap for a faster time-to-first-plot? - #199 by ChrisRackauckas), what else can we do to improve the user experience for the packages we…

---

## [Help with if-like macro](https://discourse.julialang.org/t/help-with-if-like-macro/31856)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 21\
**Last updated:** [December 4, 2019, 7:27pm UTC](https://discourse.julialang.org/t/help-with-if-like-macro/31856 "2019-12-04T19:27:26Z")

</div>

Hi - yet another macro related yelp for help :slight\_smile: I’ve been trying everything I could think of but I just can’t get it right, help much appreciated. The objective is to be able to write something in the line …

---

## [Usage of if inside arrays](https://discourse.julialang.org/t/usage-of-if-inside-arrays/31795)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 9\
**Last updated:** [December 4, 2019, 7:20pm UTC](https://discourse.julialang.org/t/usage-of-if-inside-arrays/31795 "2019-12-04T19:20:37Z")

</div>

Hello, I wish to change values inside an array if certain criteria are met. Within the array I am focusing on the values in three sections like so: (lets pretend it’s 10x10) What I want is to check the values across…

---

## [Linking to exactly one documentation in @docs of Documenter.jl](https://discourse.julialang.org/t/linking-to-exactly-one-documentation-in-docs-of-documenter-jl/31865)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 2\
**Last updated:** [December 4, 2019, 7:00pm UTC](https://discourse.julialang.org/t/linking-to-exactly-one-documentation-in-docs-of-documenter-jl/31865 "2019-12-04T19:00:19Z")

</div>

I would like to refer to exactly one version of a function that is implemented for several subtypes in Documenter, see here. Especially the line 28 which reads manifold\_dimension(::SymmetricPositiveDefinite{N}) where N…

---

## [How can I view the whole command history?](https://discourse.julialang.org/t/how-can-i-view-the-whole-command-history/17987)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 11\
**Last updated:** [December 4, 2019, 3:36pm UTC](https://discourse.julialang.org/t/how-can-i-view-the-whole-command-history/17987 "2019-12-04T15:36:16Z")

</div>

Hello. How can I view the whole list of commands used on Visual Studio Code + Julia? I’m not able to find that option. I can just use the arrows to slowly navigate through than commands on the REPL.

---

## [Optimising code: Multiplying a list of matrices by a matrix](https://discourse.julialang.org/t/optimising-code-multiplying-a-list-of-matrices-by-a-matrix/31298)

<div class="topic-metadata">

**Author:** [@scj](https://discourse.julialang.org/u/scj)\
**Replies:** 15\
**Last updated:** [December 4, 2019, 2:57pm UTC](https://discourse.julialang.org/t/optimising-code-multiplying-a-list-of-matrices-by-a-matrix/31298 "2019-12-04T14:57:57Z")

</div>

I need help optimising a piece of code which involves the computation of many small vectors and matrices. I have a list of vectors and matrices, given by mu\_i and S\_i respectively. I need to calculate nu\_i = A\*mu\_i + b a…

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

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