# Latest

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

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

**Page:** 1681

---

## [Calculation of gradient not working for an ODEproblem that uses 2D or 3D arrays](https://discourse.julialang.org/t/calculation-of-gradient-not-working-for-an-odeproblem-that-uses-2d-or-3d-arrays/42877)

<div class="topic-metadata">

**Author:** [@yanz4](https://discourse.julialang.org/u/yanz4)\
**Replies:** 1\
**Last updated:** [July 24, 2020, 3:41pm UTC](https://discourse.julialang.org/t/calculation-of-gradient-not-working-for-an-odeproblem-that-uses-2d-or-3d-arrays/42877 "2020-07-24T15:41:03Z")

</div>

Solving a set of 30 coupled pairs of 2 differential equations with u, du a 2x30 2D array results in ERROR: DimensionMismatch(“arrays could not be broadcast to a common size; got a dimension with lengths 2 and 60”). T…

---

## [Do-block map with zero argument do-block](https://discourse.julialang.org/t/do-block-map-with-zero-argument-do-block/43585)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 6\
**Last updated:** [July 24, 2020, 3:23pm UTC](https://discourse.julialang.org/t/do-block-map-with-zero-argument-do-block/43585 "2020-07-24T15:23:03Z")

</div>

This section of the Julia manual says that a plain do would declare that what follows is an anonymous function of the form () -\> ... So I would expect this to work: julia\> map(1:3) do rand(10:99) …

---

## [Can I get the declared return type of a method?](https://discourse.julialang.org/t/can-i-get-the-declared-return-type-of-a-method/43575)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 20\
**Last updated:** [July 24, 2020, 3:02pm UTC](https://discourse.julialang.org/t/can-i-get-the-declared-return-type-of-a-method/43575 "2020-07-24T15:02:28Z")

</div>

f(a :: Int8, b :: Float32) :: Float64 = a + b I have found ways to get the types of arguments of a method, such as (first(methods(f))).sig. But I don’t see a way to get the return type I declared. Is there / could there…

---

## [How to achieve the greatest speed with nested loops?](https://discourse.julialang.org/t/how-to-achieve-the-greatest-speed-with-nested-loops/43578)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 10\
**Last updated:** [July 24, 2020, 2:47pm UTC](https://discourse.julialang.org/t/how-to-achieve-the-greatest-speed-with-nested-loops/43578 "2020-07-24T14:47:20Z")

</div>

I have a large three-dimensional array X and wish to compute the sum over i of X\[i,j,m\] \* X\[i,t,m\] producing a three-dimensional array Y. I’ve tried the following (my arrays will be larger than this). using BenchmarkT…

---

## [Question on functions as parameters](https://discourse.julialang.org/t/question-on-functions-as-parameters/43618)

<div class="topic-metadata">

**Author:** [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Replies:** 2\
**Last updated:** [July 24, 2020, 2:44pm UTC](https://discourse.julialang.org/t/question-on-functions-as-parameters/43618 "2020-07-24T14:44:17Z")

</div>

Let’s assume I would like write a function that takes functions as parameters: function f1(f::Function) println("f maps from Float64 to Int64") end and I only want to allow functions function f(x:: Float64) :: In…

---

## [ReverseDiff.GradientTape fails for backslash operator when symmetric sparse matrix involved?](https://discourse.julialang.org/t/reversediff-gradienttape-fails-for-backslash-operator-when-symmetric-sparse-matrix-involved/43318)

<div class="topic-metadata">

**Author:** [@Pei](https://discourse.julialang.org/u/Pei)\
**Replies:** 4\
**Last updated:** [July 24, 2020, 2:44pm UTC](https://discourse.julialang.org/t/reversediff-gradienttape-fails-for-backslash-operator-when-symmetric-sparse-matrix-involved/43318 "2020-07-24T14:44:02Z")

</div>

Hi! I am using ReverseDiff to calculate the gradient of a scalar function with respect to its vector input. A simplified piece of code is attached in the end. It’s observed the ReverseDiff.GradientTape(loss\_rd, x) brea…

---

## [Calculate joint probability from Turing model](https://discourse.julialang.org/t/calculate-joint-probability-from-turing-model/43545)

<div class="topic-metadata">

**Author:** [@treichelt](https://discourse.julialang.org/u/treichelt)\
**Replies:** 3\
**Last updated:** [July 24, 2020, 2:35pm UTC](https://discourse.julialang.org/t/calculate-joint-probability-from-turing-model/43545 "2020-07-24T14:35:30Z")

</div>

Given a model defined in Turing I would like to calculate the joint probability function over all the variables. Say I have the model @model function model(y) mu ~ Normal(0, 1) y ~ Normal(mu, 1) end y\_obs = 1 m…

---

## [Alias for a macro](https://discourse.julialang.org/t/alias-for-a-macro/6615)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.julialang.org/u/turtle)\
**Replies:** 10\
**Last updated:** [July 24, 2020, 1:27pm UTC](https://discourse.julialang.org/t/alias-for-a-macro/6615 "2020-07-24T13:27:31Z")

</div>

How can I alias a macro? I would like to use @dot instead of @..

---

## [Plotting graphs with movable nodes](https://discourse.julialang.org/t/plotting-graphs-with-movable-nodes/43615)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 0\
**Last updated:** [July 24, 2020, 12:52pm UTC](https://discourse.julialang.org/t/plotting-graphs-with-movable-nodes/43615 "2020-07-24T12:52:48Z")

</div>

Hi All, I would like to ask, of anyone knows about a simple way, how draw a graph, e.g. like this one such that I can move the vertices? Thanks a lot, Tomas

---

## [Trying variety of Solvers](https://discourse.julialang.org/t/trying-variety-of-solvers/43567)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 2\
**Last updated:** [July 24, 2020, 11:45am UTC](https://discourse.julialang.org/t/trying-variety-of-solvers/43567 "2020-07-24T11:45:31Z")

</div>

hello there, I have been looking for some solver to try with my problem ( non convex NLP) After finishing the modelling stage, I was really impressed by the easiness of using a solver like Ipopt with JuMP, but now to l…

---

## [Incomplete initialization (control which fields are initialized in \`new\`)](https://discourse.julialang.org/t/incomplete-initialization-control-which-fields-are-initialized-in-new/43452)

<div class="topic-metadata">

**Author:** [@FedericoStra](https://discourse.julialang.org/u/FedericoStra)\
**Replies:** 33\
**Last updated:** [July 24, 2020, 11:17am UTC](https://discourse.julialang.org/t/incomplete-initialization-control-which-fields-are-initialized-in-new/43452 "2020-07-24T11:17:55Z")

</div>

Following the guidelines regarding incomplete initialization and parametric constructors, I can create a type struct P{T} x::T y::T P{T}(x::T, y::T) where T = new{T}(x, y) P{T}(x::T) where T = new{T}(x)…

---

## [Julia podcasts](https://discourse.julialang.org/t/julia-podcasts/43602)

<div class="topic-metadata">

**Author:** [@skorpio11](https://discourse.julialang.org/u/skorpio11)\
**Replies:** 3\
**Last updated:** [July 24, 2020, 9:46am UTC](https://discourse.julialang.org/t/julia-podcasts/43602 "2020-07-24T09:46:16Z")

</div>

Just wondering if there is any podcast specifically focused on Julia Programing.

---

## [Newbie questions coming from Python/C++](https://discourse.julialang.org/t/newbie-questions-coming-from-python-c/43512)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 29\
**Last updated:** [July 24, 2020, 9:23am UTC](https://discourse.julialang.org/t/newbie-questions-coming-from-python-c/43512 "2020-07-24T09:23:28Z")

</div>

Hi, I have extensive experience in Python and C++ and am trying out Julia. There’s a lot that I like from what I’ve seen so far, really nice language, packaging, documentation, introspection of generated code (cool!). I …

---

## [Can I customize the accumulator type and result type for my types separately?](https://discourse.julialang.org/t/can-i-customize-the-accumulator-type-and-result-type-for-my-types-separately/43601)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 3\
**Last updated:** [July 24, 2020, 9:17am UTC](https://discourse.julialang.org/t/can-i-customize-the-accumulator-type-and-result-type-for-my-types-separately/43601 "2020-07-24T09:17:23Z")

</div>

In some cases of reduction operations, it may be useful to use special intermediate representations for speed and accuracy. A typical example is computing the sum of fixed-point numbers within the form of an integer accu…

---

## [Help needed populating JuliaCon videos with their abstract from pretalx](https://discourse.julialang.org/t/help-needed-populating-juliacon-videos-with-their-abstract-from-pretalx/43563)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 5\
**Last updated:** [July 24, 2020, 7:27am UTC](https://discourse.julialang.org/t/help-needed-populating-juliacon-videos-with-their-abstract-from-pretalx/43563 "2020-07-24T07:27:14Z")

</div>

Hey all, we are looking for someone who would be willing to copy over (literally copy and paste) the talk abstract from pretalx into the YouTube video description for that talk. We would we happy to provide a free Julia…

---

## [ERROR: could not load library libcutensor.so](https://discourse.julialang.org/t/error-could-not-load-library-libcutensor-so/43020)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 19\
**Last updated:** [July 24, 2020, 6:24am UTC](https://discourse.julialang.org/t/error-could-not-load-library-libcutensor-so/43020 "2020-07-24T06:24:26Z")

</div>

After a fresh installation of CUDA.jl 1.1/1.0, we got the following error on a cluster when trying to precompile a package that has CUDA in its dependencies: \[ Info: Precompiling ParallelStencil \[94395366-693c-11ea-3b26…

---

## [Non-Unique sets of n elements with replacement](https://discourse.julialang.org/t/non-unique-sets-of-n-elements-with-replacement/43579)

<div class="topic-metadata">

**Author:** [@PT.303](https://discourse.julialang.org/u/PT.303)\
**Replies:** 3\
**Last updated:** [July 24, 2020, 6:07am UTC](https://discourse.julialang.org/t/non-unique-sets-of-n-elements-with-replacement/43579 "2020-07-24T06:07:39Z")

</div>

Given a vector v = \[1,…,n\], I am trying to compute all non-unique sets of k elements with replacement. For example, v = \[1, 2, 3, 4, 5\] and k = 3: should result in \[1,1,1\], \[1,1,2\], \[1,1,3\], \[1,1,4\], \[1,1,5\], \[1,2,1\],…

---

## [Using Unicode characters like \\to and \\ne instead of -\> and !=](https://discourse.julialang.org/t/using-unicode-characters-like-to-and-ne-instead-of-and/43597)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 3\
**Last updated:** [July 24, 2020, 3:55am UTC](https://discourse.julialang.org/t/using-unicode-characters-like-to-and-ne-instead-of-and/43597 "2020-07-24T03:55:09Z")

</div>

I just discovered that I can use Unicode characters like \\to and \\ne instead of -\> and !=. Is anyone using them in their daily coding? In official Julia packages?

---

## [Bug in DataFrames grouping](https://discourse.julialang.org/t/bug-in-dataframes-grouping/43599)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 8\
**Last updated:** [July 24, 2020, 3:34am UTC](https://discourse.julialang.org/t/bug-in-dataframes-grouping/43599 "2020-07-24T03:34:25Z")

</div>

Here is a reproducible example, and I explain the bug at the end. I am just copying/pasting my code here, and some of the steps may not be needed. But it’s fully contained code, not very complicated, and documented. It s…

---

## [Difference between df.column and df\[!, :column\]](https://discourse.julialang.org/t/difference-between-df-column-and-df-column/43530)

<div class="topic-metadata">

**Author:** [@pauloat](https://discourse.julialang.org/u/pauloat)\
**Replies:** 9\
**Last updated:** [July 23, 2020, 11:40pm UTC](https://discourse.julialang.org/t/difference-between-df-column-and-df-column/43530 "2020-07-23T23:40:06Z")

</div>

Hi, im seeing this two ways to call a column and testing into code cant see any difference, is one better that the other? thanks.

---

## [SDP relaxation in PowerModelsAneex](https://discourse.julialang.org/t/sdp-relaxation-in-powermodelsaneex/41898)

<div class="topic-metadata">

**Author:** [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Replies:** 6\
**Last updated:** [July 23, 2020, 11:37pm UTC](https://discourse.julialang.org/t/sdp-relaxation-in-powermodelsaneex/41898 "2020-07-23T23:37:11Z")

</div>

Hi All, I am wondering if there is an SDP relaxation of the OPF problem in PowerModelsAnnex? If there is no such function, I would appreciate any guide for implementing that in the PowerModelsAnnex. I have noticed ther…

---

## [Large initial values in DAE system](https://discourse.julialang.org/t/large-initial-values-in-dae-system/43592)

<div class="topic-metadata">

**Author:** [@lob](https://discourse.julialang.org/u/lob)\
**Replies:** 0\
**Last updated:** [July 23, 2020, 10:17pm UTC](https://discourse.julialang.org/t/large-initial-values-in-dae-system/43592 "2020-07-23T22:17:13Z")

</div>

Hi all, I am trying to solve a DAE system using DifferentialEquations.jl where initial values can be relatively large (order 1e22). The MWE below (algebraic equations omitted) solves fine up to n0\[1\] = 1e15 but throws a…

---

## [String pool / indirect array analogue to make a struct isbits?](https://discourse.julialang.org/t/string-pool-indirect-array-analogue-to-make-a-struct-isbits/43503)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 5\
**Last updated:** [July 23, 2020, 10:09pm UTC](https://discourse.julialang.org/t/string-pool-indirect-array-analogue-to-make-a-struct-isbits/43503 "2020-07-23T22:09:30Z")

</div>

I have a program which ingests JSON describe a list of objects. For the sake of example, let’s say each object is a Cartesian point with a name: struct NamedPoint x::Float64 y::Float64 name::String end The …

---

## [Fast math in NASA benchmark](https://discourse.julialang.org/t/fast-math-in-nasa-benchmark/43580)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 8\
**Last updated:** [July 23, 2020, 9:16pm UTC](https://discourse.julialang.org/t/fast-math-in-nasa-benchmark/43580 "2020-07-23T21:16:53Z")

</div>

I noticed in this benchmark that the --fast-math GCC option was far more effective in reducing the runtime then the --math-mode=fast Julia option. What do you think is the reason for that?

---

## [How to define a heuristic callback using JuMP?](https://discourse.julialang.org/t/how-to-define-a-heuristic-callback-using-jump/43322)

<div class="topic-metadata">

**Author:** [@Gaiato](https://discourse.julialang.org/u/Gaiato)\
**Replies:** 8\
**Last updated:** [July 23, 2020, 9:10pm UTC](https://discourse.julialang.org/t/how-to-define-a-heuristic-callback-using-jump/43322 "2020-07-23T21:10:01Z")

</div>

I’m trying to implement integer programming callbacks using JuMP. Basically, my heuristic callback is defined like this: function my\_heuristic\_callback(cb\_data) x\_val = \[callback\_value(cb\_data, x\_i) for x\_i in x\] x\_s…

---

## [How to do "((1,2), 3) .+ ((1,2), 3)"?](https://discourse.julialang.org/t/how-to-do-1-2-3-1-2-3/43582)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 5\
**Last updated:** [July 23, 2020, 8:55pm UTC](https://discourse.julialang.org/t/how-to-do-1-2-3-1-2-3/43582 "2020-07-23T20:55:46Z")

</div>

TL;DR: How can we “broadcast” a function over several nested Tuples such as ((1,2), 3) .+ ((1,2), 3)? So, say I have several objects x\_i that are tuples of tuples and numbers (each of the tuples itself a tuple of tuples…

---

## [Float64 is typecasted to float16](https://discourse.julialang.org/t/float64-is-typecasted-to-float16/43441)

<div class="topic-metadata">

**Author:** [@sudo](https://discourse.julialang.org/u/sudo)\
**Replies:** 8\
**Last updated:** [July 23, 2020, 8:53pm UTC](https://discourse.julialang.org/t/float64-is-typecasted-to-float16/43441 "2020-07-23T20:53:34Z")

</div>

I am trying to calculate mean of some values. These values are of type Float16. When performing mean operation, I see the value to be Inf16. I tried to assign the result to a variable of type float64 as well, but it didn…

---

## [Juno Project pane colors](https://discourse.julialang.org/t/juno-project-pane-colors/43583)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [July 23, 2020, 8:22pm UTC](https://discourse.julialang.org/t/juno-project-pane-colors/43583 "2020-07-23T20:22:35Z")

</div>

Where is the documentation for the various colors of directories and files in the Project pane? They have something to do with the VC local repo status but I searched “colors” the Juno documentation and all it turned up…

---

## [Makie seems overall broken after update?](https://discourse.julialang.org/t/makie-seems-overall-broken-after-update/38634)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 4\
**Last updated:** [July 23, 2020, 8:09pm UTC](https://discourse.julialang.org/t/makie-seems-overall-broken-after-update/38634 "2020-07-23T20:09:18Z")

</div>

The example for mesh (and my own personal examples) are not working http://juliaplots.org/MakieReferenceImages/gallery//fem\_mesh\_2d/index.html Previously it worked fine, but now I get this error: ERROR: MethodError: n…

---

## [Synthetic X-ray tomography with Julia](https://discourse.julialang.org/t/synthetic-x-ray-tomography-with-julia/19353)

<div class="topic-metadata">

**Author:** [@KirillGerke](https://discourse.julialang.org/u/KirillGerke)\
**Replies:** 10\
**Last updated:** [July 23, 2020, 8:03pm UTC](https://discourse.julialang.org/t/synthetic-x-ray-tomography-with-julia/19353 "2020-07-23T20:03:23Z")

</div>

Dear All, Objective: My aim is to use Julia to combine a number of complex computational tasks, one of them being creation of synthetic tomography. My search provided no results on existing Julia packages related to X-r…

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

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