# Latest

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

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

**Page:** 1955

---

## [Help reshaping a 3D array](https://discourse.julialang.org/t/help-reshaping-a-3d-array/26525)

<div class="topic-metadata">

**Author:** [@Yoshua](https://discourse.julialang.org/u/Yoshua)\
**Replies:** 2\
**Last updated:** [July 23, 2019, 11:05pm UTC](https://discourse.julialang.org/t/help-reshaping-a-3d-array/26525 "2019-07-23T23:05:27Z")

</div>

Hello! I want to make a 3D array. From this I will group three different data vectors to put in this 3-D array. However, I’m having problem with the reshape function. Img = reshape(\[\[KrogagerR\],\[KrogagerG\],\[KrogagerB\]\],…

---

## [Most idomatic way to convert an Images.jl Image to a 3-d array?](https://discourse.julialang.org/t/most-idomatic-way-to-convert-an-images-jl-image-to-a-3-d-array/7104)

<div class="topic-metadata">

**Author:** [@mac01021](https://discourse.julialang.org/u/mac01021)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 11:03pm UTC](https://discourse.julialang.org/t/most-idomatic-way-to-convert-an-images-jl-image-to-a-3-d-array/7104 "2019-07-23T23:03:54Z")

</div>

I’ve loaded an image file to get a 2-d array of RGB color values. What I want is a 3-d array with depth 3. The function below will do the job. But is there a more idomatic way? rgb\_to\_array(img) = begin H, W = h…

---

## [CI/testing for big endian architectures?](https://discourse.julialang.org/t/ci-testing-for-big-endian-architectures/26671)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 6:58pm UTC](https://discourse.julialang.org/t/ci-testing-for-big-endian-architectures/26671 "2019-07-23T18:58:15Z")

</div>

I am working on code for which byte order is relevant when unpacking binary data. My understanding is that most modern architectures are little-endian, so I could just put an Base.ENDIAN\_BOM == 0x04030201 || error("only…

---

## [What problems will one have, if \`Real\` was made a subtype of \`Complex\`?](https://discourse.julialang.org/t/what-problems-will-one-have-if-real-was-made-a-subtype-of-complex/26662)

<div class="topic-metadata">

**Author:** [@tianrluo](https://discourse.julialang.org/u/tianrluo)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 6:10pm UTC](https://discourse.julialang.org/t/what-problems-will-one-have-if-real-was-made-a-subtype-of-complex/26662 "2019-07-23T18:10:30Z")

</div>

(New to Julia, and type theory/system.) (Original question above this line) @Tamas\_Papp @Per Thanks for answering! Basically, the story was I had a function similar to f(a::Complex) = a, and expected it to accept Int…

---

## [Toggle console pane in Juno](https://discourse.julialang.org/t/toggle-console-pane-in-juno/26633)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 3\
**Last updated:** [July 23, 2019, 5:57pm UTC](https://discourse.julialang.org/t/toggle-console-pane-in-juno/26633 "2019-07-23T17:57:58Z")

</div>

On a mac, CMD+J CMD+O opens the console pane / focuses on the console pane. Is there a shortcut that does the opposite? I.e. hides the console pane and ideally focuses on the last file tab? I couldn’t find a relevant key…

---

## [Indexing with \`CartesianIndex\`](https://discourse.julialang.org/t/indexing-with-cartesianindex/26615)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 14\
**Last updated:** [July 23, 2019, 5:52pm UTC](https://discourse.julialang.org/t/indexing-with-cartesianindex/26615 "2019-07-23T17:52:05Z")

</div>

Consider this code: julia\> 1\[\] 1 julia\> 1\[CartesianIndex()\] 1 julia\> Ref(1)\[\] 1 julia\> Ref(1)\[CartesianIndex()\] ERROR: MethodError: no method matching getindex(::Base.RefValue{Int64}, ::CartesianIndex{0}) Is there a…

---

## [How to use SIMD with a very simple example](https://discourse.julialang.org/t/how-to-use-simd-with-a-very-simple-example/26676)

<div class="topic-metadata">

**Author:** [@davidbp](https://discourse.julialang.org/u/davidbp)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 5:05pm UTC](https://discourse.julialang.org/t/how-to-use-simd-with-a-very-simple-example/26676 "2019-07-23T17:05:53Z")

</div>

Hello, I am trying to understand how to use SIMD.jl. After trying the vadd! example in the documentation I wanted use SIMD in a different example. No success so far. This is what I would like to simdify: function myf…

---

## [Formulate my own objective function using PowerModels.jl variables](https://discourse.julialang.org/t/formulate-my-own-objective-function-using-powermodels-jl-variables/25938)

<div class="topic-metadata">

**Author:** [@faoh](https://discourse.julialang.org/u/faoh)\
**Replies:** 10\
**Last updated:** [July 23, 2019, 4:23pm UTC](https://discourse.julialang.org/t/formulate-my-own-objective-function-using-powermodels-jl-variables/25938 "2019-07-23T16:23:47Z")

</div>

Hello, I want to use PowerModels.jl flow variables to formulate a different objective function. I try to see the format of variable\_branch\_flow and call it with PowerModels.variable\_branch\_flow(pm). However, when I try…

---

## [Think Julia exercise 7-3](https://discourse.julialang.org/t/think-julia-exercise-7-3/26682)

<div class="topic-metadata">

**Author:** [@Dito](https://discourse.julialang.org/u/Dito)\
**Replies:** 1\
**Last updated:** [July 23, 2019, 1:32pm UTC](https://discourse.julialang.org/t/think-julia-exercise-7-3/26682 "2019-07-23T13:32:03Z")

</div>

The built-in function Meta.parse takes a string and transforms it into an expression. This expression can be evaluated in Julia with the function Core.eval. For example: julia\> expr = Meta.parse("1+2\*3") :(1 + 2 \* 3) ju…

---

## [How to get second order gradient of a neural network?](https://discourse.julialang.org/t/how-to-get-second-order-gradient-of-a-neural-network/26631)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 1\
**Last updated:** [July 23, 2019, 12:53pm UTC](https://discourse.julialang.org/t/how-to-get-second-order-gradient-of-a-neural-network/26631 "2019-07-23T12:53:10Z")

</div>

Hi, I am trying to plot the second order derivative of a single input-single output neural network. I can do the first order derivative just fine but the second order derivative computed with the Tracker package is simp…

---

## [Issues with println buffering output when redirecting stdout to a txt file](https://discourse.julialang.org/t/issues-with-println-buffering-output-when-redirecting-stdout-to-a-txt-file/23738)

<div class="topic-metadata">

**Author:** [@jonbarkerlondon](https://discourse.julialang.org/u/jonbarkerlondon)\
**Replies:** 14\
**Last updated:** [July 23, 2019, 12:48pm UTC](https://discourse.julialang.org/t/issues-with-println-buffering-output-when-redirecting-stdout-to-a-txt-file/23738 "2019-07-23T12:48:03Z")

</div>

Hey all, I’m attempting to find the julia definition for the println method as I want to replace it with my own custom println method that performs a flush(stdout) after every println I’ve found this but it doesn’t see…

---

## [How to redirect output with error function to log.err file?](https://discourse.julialang.org/t/how-to-redirect-output-with-error-function-to-log-err-file/26680)

<div class="topic-metadata">

**Author:** [@Martin\_Florek](https://discourse.julialang.org/u/Martin_Florek)\
**Replies:** 0\
**Last updated:** [July 23, 2019, 12:39pm UTC](https://discourse.julialang.org/t/how-to-redirect-output-with-error-function-to-log-err-file/26680 "2019-07-23T12:39:43Z")

</div>

For instance: sqrt(-1) p.s.: I don’t need to see it in the console. It’s App. Thanks

---

## [Livestreamed talks not live?](https://discourse.julialang.org/t/livestreamed-talks-not-live/26677)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [July 23, 2019, 12:24pm UTC](https://discourse.julialang.org/t/livestreamed-talks-not-live/26677 "2019-07-23T12:24:35Z")

</div>

Anyone knows what is going on?

---

## [Ways to make slow/sluggish REPL/interactive development experience faster?](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293)

<div class="topic-metadata">

**Author:** [@abe](https://discourse.julialang.org/u/abe)\
**Replies:** 35\
**Last updated:** [July 23, 2019, 11:56am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293 "2019-07-23T11:56:36Z")

</div>

New to Julia from R and so far very disappointed with the interactive experience. I get that compiles will take time, but it seems like everything is slow. I don’t get why something like “using mycoolpackage” or “add ano…

---

## [Using RCall, R 3.5.3 -\> R 3.6.1](https://discourse.julialang.org/t/using-rcall-r-3-5-3-r-3-6-1/26675)

<div class="topic-metadata">

**Author:** [@Gunter\_Faes](https://discourse.julialang.org/u/Gunter_Faes)\
**Replies:** 1\
**Last updated:** [July 23, 2019, 10:08am UTC](https://discourse.julialang.org/t/using-rcall-r-3-5-3-r-3-6-1/26675 "2019-07-23T10:08:12Z")

</div>

First of all, this is just a field report! With R version 3.6.0, some major changes and enhancements have been implemented compared to the previous versions (e.g. R 3.5.3). This means that it became necessary to instal…

---

## [Can't install the WebIO labextension](https://discourse.julialang.org/t/cant-install-the-webio-labextension/26674)

<div class="topic-metadata">

**Author:** [@Masacroso](https://discourse.julialang.org/u/Masacroso)\
**Replies:** 0\
**Last updated:** [July 23, 2019, 9:55am UTC](https://discourse.julialang.org/t/cant-install-the-webio-labextension/26674 "2019-07-23T09:55:31Z")

</div>

Im trying to install the WebIO labextension to use in Jupyter Lab. I had read that I must build the WebIO in the Julia REPL, but the log of the build says \> C:\\Users\\p5b\\Anaconda3\\npm.CMD pack C:\\Users\\p5b\\.julia\\packag…

---

## [PGFPlotsX howto annotate?](https://discourse.julialang.org/t/pgfplotsx-howto-annotate/26246)

<div class="topic-metadata">

**Author:** [@Rob\_van\_Weelderen](https://discourse.julialang.org/u/Rob_van_Weelderen)\
**Replies:** 7\
**Last updated:** [July 23, 2019, 8:39am UTC](https://discourse.julialang.org/t/pgfplotsx-howto-annotate/26246 "2019-07-23T08:39:24Z")

</div>

Hello, I’m moving to using PGFPlotsX, for it’s suitability for producing good publication ready plots, and got following the PGFPlotsX.jl and PGFPlots documentation most that I need functioning. However I got stuck in …

---

## [Changing legend of plot after calling plot using Plots.jl](https://discourse.julialang.org/t/changing-legend-of-plot-after-calling-plot-using-plots-jl/26537)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 3\
**Last updated:** [July 23, 2019, 8:19am UTC](https://discourse.julialang.org/t/changing-legend-of-plot-after-calling-plot-using-plots-jl/26537 "2019-07-23T08:19:06Z")

</div>

I would like to do something like the following: x = 1:10 y = 2.\*x for p = 1:3 plot(x,y, lab = "Data") p == 1 ? legend(:topright) : legend(false) Except for the life of me I can’t find out how to change the le…

---

## [Can include one .jl file but not another](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 7:58am UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638 "2019-07-23T07:58:40Z")

</div>

I am trying to call julia files into the file I am currently working on. I can include Schneider et al 2016 parameter.jl and it calculates its values, but I get an error when I try to include Schneider et al functions ha…

---

## [PostDoc Glaciology](https://discourse.julialang.org/t/postdoc-glaciology/26670)

<div class="topic-metadata">

**Author:** [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Replies:** 0\
**Last updated:** [July 23, 2019, 7:22am UTC](https://discourse.julialang.org/t/postdoc-glaciology/26670 "2019-07-23T07:22:20Z")

</div>

We got a postdoc advertised in glaciology: The ad is pretty broad. One focus could certainly be in the area of numerical and theoretical geo-computation (in glaciology). For instance, a possible project could be to p…

---

## [How to convert parsed equation to its source format?](https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665)

<div class="topic-metadata">

**Author:** [@Islam0mar](https://discourse.julialang.org/u/Islam0mar)\
**Replies:** 2\
**Last updated:** [July 23, 2019, 6:34am UTC](https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665 "2019-07-23T06:34:20Z")

</div>

I want to change the following equation: 11 x² - 484 x + 12358 to (11 \* x ^ 2 - 484x) + 12358 Is there any package or builtin function to do that? Note: My use case is for JuMP package and I have a work around for…

---

## [Add Probabilistic Programming Domain](https://discourse.julialang.org/t/add-probabilistic-programming-domain/26637)

<div class="topic-metadata">

**Author:** [@trappmartin](https://discourse.julialang.org/u/trappmartin)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 6:33am UTC](https://discourse.julialang.org/t/add-probabilistic-programming-domain/26637 "2019-07-23T06:33:14Z")

</div>

Hi, as the Probabilistic Programming Languages (PPL) field in Julia seems to grow more and more, with lots of interesting packages and approaches it might be a good time to add a Probabilistic Programming Domain to disc…

---

## [Looped optimization model](https://discourse.julialang.org/t/looped-optimization-model/26600)

<div class="topic-metadata">

**Author:** [@MuadhF](https://discourse.julialang.org/u/MuadhF)\
**Replies:** 4\
**Last updated:** [July 23, 2019, 5:19am UTC](https://discourse.julialang.org/t/looped-optimization-model/26600 "2019-07-23T05:19:15Z")

</div>

Hi, I created a JuMP optimization model that reads input from CSV files. However, I want the program to go through more than one set of input files, so that I would have the objective values and solutions to all the mod…

---

## [Decrease in performance using Threads.@threads in Linux](https://discourse.julialang.org/t/decrease-in-performance-using-threads-threads-in-linux/26522)

<div class="topic-metadata">

**Author:** [@amcostant](https://discourse.julialang.org/u/amcostant)\
**Replies:** 16\
**Last updated:** [July 23, 2019, 5:19am UTC](https://discourse.julialang.org/t/decrease-in-performance-using-threads-threads-in-linux/26522 "2019-07-23T05:19:09Z")

</div>

I am attempting to parallelize this code function pdiff(b1::Array{Basic,1}, b2::Basic) dfdx = Array{Basic}(undef,length(b1)) Threads.@threads for i = 1:length(b1) a = Basic() ret = ccall((:basic\_…

---

## [\[ANN\] FastRationals.jl](https://discourse.julialang.org/t/ann-fastrationals-jl/26634)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 4\
**Last updated:** [July 22, 2019, 6:40pm UTC](https://discourse.julialang.org/t/ann-fastrationals-jl/26634 "2019-07-22T18:40:56Z")

</div>

FastRationals.jl gives you rational arithmetic that is much faster than the system Rationals. Please note that this is not a general purpose package. It works well only when working either in limited rational domains, …

---

## [How to derive the dual formulation with JuMP?](https://discourse.julialang.org/t/how-to-derive-the-dual-formulation-with-jump/26639)

<div class="topic-metadata">

**Author:** [@dourouc05](https://discourse.julialang.org/u/dourouc05)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 2:17am UTC](https://discourse.julialang.org/t/how-to-derive-the-dual-formulation-with-jump/26639 "2019-07-23T02:17:07Z")

</div>

Hi all, The dual formulation is useful for many things (robust reformulation, column generation, and so many others). Is there a way in JuMP to generate the dual of a model? (Not getting the dual values for each constra…

---

## [Assertion: jl\_TargetMachine](https://discourse.julialang.org/t/assertion-jl-targetmachine/26483)

<div class="topic-metadata">

**Author:** [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Replies:** 4\
**Last updated:** [July 23, 2019, 1:24am UTC](https://discourse.julialang.org/t/assertion-jl-targetmachine/26483 "2019-07-23T01:24:03Z")

</div>

Summary of situation: built julia-1.2.0-rc2 from source for centos6 with gcc 6.4.0 and -DGLIBCXX\_USE\_CXX11\_ABI=0 dlopen an .so which embeds some simple julia code. “Lifted” into global namespace with dlopen(RTLD\_NOW |…

---

## [Slides for JuliaCon Pkg workshop](https://discourse.julialang.org/t/slides-for-juliacon-pkg-workshop/26660)

<div class="topic-metadata">

**Author:** [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Replies:** 0\
**Last updated:** [July 23, 2019, 1:00am UTC](https://discourse.julialang.org/t/slides-for-juliacon-pkg-workshop/26660 "2019-07-23T01:00:25Z")

</div>

We (me and @fredrikekre) had a workshop today on JuliaCon about Pkg and writing packages. The workshop was not recorded but perhaps the slides can be of some use: http://tiny.cc/itg29y.

---

## [Dict merge without promoting](https://discourse.julialang.org/t/dict-merge-without-promoting/26648)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 4\
**Last updated:** [July 22, 2019, 11:52pm UTC](https://discourse.julialang.org/t/dict-merge-without-promoting/26648 "2019-07-22T23:52:24Z")

</div>

Is there any existing way to merge without promotion? Maybe with constructing a dict that has union type? Right now I’m trying to merge dicts that may have values of Int or Float type, in an arbitrary order, and I need t…

---

## [Sqlite3 interface problem](https://discourse.julialang.org/t/sqlite3-interface-problem/26653)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 3\
**Last updated:** [July 22, 2019, 11:18pm UTC](https://discourse.julialang.org/t/sqlite3-interface-problem/26653 "2019-07-22T23:18:19Z")

</div>

i have an sqlite db and did the following. Did the very obvious thing: db=SQLite.DB("test.db") s=SQLite.Query(db, "select distinct date from table") I should point out that i ran both SQLite.tables and SQLite.columns …

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

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