# Latest

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

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

**Page:** 800

---

## [How can you modify global variables that are used in functions that are being called with ccall?](https://discourse.julialang.org/t/how-can-you-modify-global-variables-that-are-used-in-functions-that-are-being-called-with-ccall/93644)

<div class="topic-metadata">

**Author:** [@dmmpie](https://discourse.julialang.org/u/dmmpie)\
**Replies:** 4\
**Last updated:** [January 27, 2023, 5:33pm UTC](https://discourse.julialang.org/t/how-can-you-modify-global-variables-that-are-used-in-functions-that-are-being-called-with-ccall/93644 "2023-01-27T17:33:41Z")

</div>

From the documentation, I got that it’s possible to retrieve pointers to global variables by using the cglobal function. However, I wasn’t able to figure out from that how I can set the value of a global variable that is…

---

## [Hatched fill with Plots and GR](https://discourse.julialang.org/t/hatched-fill-with-plots-and-gr/43640)

<div class="topic-metadata">

**Author:** [@Tominapa](https://discourse.julialang.org/u/Tominapa)\
**Replies:** 4\
**Last updated:** [January 27, 2023, 5:14pm UTC](https://discourse.julialang.org/t/hatched-fill-with-plots-and-gr/43640 "2023-01-27T17:14:08Z")

</div>

I am working with a grouped bar graph with plots (and statsplots for the groupedbar() type) using GR as the backend. Here is an example of the type of graph I’m working with: using Plots using StatsPlots using Colors m…

---

## [Type stability bug in compiler?](https://discourse.julialang.org/t/type-stability-bug-in-compiler/93640)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 13\
**Last updated:** [January 27, 2023, 5:08pm UTC](https://discourse.julialang.org/t/type-stability-bug-in-compiler/93640 "2023-01-27T17:08:45Z")

</div>

If I change a line of my code from cost = typemax(Float64) to cost::Float64 = typemax(Float64) then it becomes type stable (Any goes away). How can it be? The rest of the code is somewhat complicated, and I’m not su…

---

## [How do you reference a symbol from a specific module in a fortran shared object library with the ccall utility?](https://discourse.julialang.org/t/how-do-you-reference-a-symbol-from-a-specific-module-in-a-fortran-shared-object-library-with-the-ccall-utility/93580)

<div class="topic-metadata">

**Author:** [@dmmpie](https://discourse.julialang.org/u/dmmpie)\
**Replies:** 7\
**Last updated:** [January 27, 2023, 4:55pm UTC](https://discourse.julialang.org/t/how-do-you-reference-a-symbol-from-a-specific-module-in-a-fortran-shared-object-library-with-the-ccall-utility/93580 "2023-01-27T16:55:48Z")

</div>

When I have a “simple” fortran program with a singular module, I can reference the symbols simply by copying the symbol name from the result of the nm command: x = ccall((:\_\_mod\_julfort\_MOD\_dot, "path/to/my/lib.so"), …

---

## [Save results from nested loop with multiple iterations](https://discourse.julialang.org/t/save-results-from-nested-loop-with-multiple-iterations/93412)

<div class="topic-metadata">

**Author:** [@Filippati](https://discourse.julialang.org/u/Filippati)\
**Replies:** 4\
**Last updated:** [January 27, 2023, 4:31pm UTC](https://discourse.julialang.org/t/save-results-from-nested-loop-with-multiple-iterations/93412 "2023-01-27T16:31:11Z")

</div>

Hello everyone! I am writing a nested loop with a structure that can be summarised with something like this: D = \[\] horizon = 40 for i in 1:7 A = function1(data\[:, i\]) # A is a MxN matrix B = function2(data\[:, …

---

## [Upload image GenieBuilder](https://discourse.julialang.org/t/upload-image-geniebuilder/93643)

<div class="topic-metadata">

**Author:** [@Itzi](https://discourse.julialang.org/u/Itzi)\
**Replies:** 0\
**Last updated:** [January 27, 2023, 3:54pm UTC](https://discourse.julialang.org/t/upload-image-geniebuilder/93643 "2023-01-27T15:54:43Z")

</div>

Hi, I am trying to upload an image into my Genie Builder app and I can not see it in the explorer when I open the app. What is the procedure to upload an image using GenieBuilder? Is it enough with the src? If I try to…

---

## [Not getting roots using "IntervalRootFinding.jl" package in Pluto.jl notebook](https://discourse.julialang.org/t/not-getting-roots-using-intervalrootfinding-jl-package-in-pluto-jl-notebook/93592)

<div class="topic-metadata">

**Author:** [@Kanishk](https://discourse.julialang.org/u/Kanishk)\
**Replies:** 3\
**Last updated:** [January 27, 2023, 3:46pm UTC](https://discourse.julialang.org/t/not-getting-roots-using-intervalrootfinding-jl-package-in-pluto-jl-notebook/93592 "2023-01-27T15:46:09Z")

</div>

Hello I am trying to find the roots of an equation using “IntervalRootFinding.jl” package in Pluto.jl notebook. But I am not able to get the roots; could you please check the code? using IntervalArithmetic, IntervalRoo…

---

## [Celebrate a Community Member: Robin Deits (@rdeits) & Twan Koolen (@tkoolen)](https://discourse.julialang.org/t/celebrate-a-community-member-robin-deits-rdeits-twan-koolen-tkoolen/93636)

<div class="topic-metadata">

**Author:** [@natemcintosh](https://discourse.julialang.org/u/natemcintosh)\
**Replies:** 5\
**Last updated:** [January 27, 2023, 3:43pm UTC](https://discourse.julialang.org/t/celebrate-a-community-member-robin-deits-rdeits-twan-koolen-tkoolen/93636 "2023-01-27T15:43:24Z")

</div>

In case you haven’t seen it, in the latest Boston Dynamics Atlas video, our very own @rdeits appears! Check out 1:28. EDIT: I should have watched the whole video, because @tkoolen appears at 4:07!!!

---

## [Is there an operation like map but with accumulated state?](https://discourse.julialang.org/t/is-there-an-operation-like-map-but-with-accumulated-state/93581)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 2:35pm UTC](https://discourse.julialang.org/t/is-there-an-operation-like-map-but-with-accumulated-state/93581 "2023-01-27T14:35:30Z")

</div>

I want to do a map operation, but have the previous calculated value available to each step. Or put another way, I want to run a foldl but output a collection of the results of each step. It seems like this should be a c…

---

## [How to properly format Genie Builder](https://discourse.julialang.org/t/how-to-properly-format-genie-builder/93637)

<div class="topic-metadata">

**Author:** [@Itzi](https://discourse.julialang.org/u/Itzi)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 2:26pm UTC](https://discourse.julialang.org/t/how-to-properly-format-genie-builder/93637 "2023-01-27T14:26:26Z")

</div>

hi again! I am new to Julia and I am using GenieBuilder to build a GUI. At the moment I am having trouble with the size of the text forms. Here is a screenshot of a very simple program to calculate mass flow and power…

---

## [Issue with Flux/Optimisers' freeze, thaw and adjust functions](https://discourse.julialang.org/t/issue-with-flux-optimisers-freeze-thaw-and-adjust-functions/93292)

<div class="topic-metadata">

**Author:** [@Naba7](https://discourse.julialang.org/u/Naba7)\
**Replies:** 12\
**Last updated:** [January 27, 2023, 2:22pm UTC](https://discourse.julialang.org/t/issue-with-flux-optimisers-freeze-thaw-and-adjust-functions/93292 "2023-01-27T14:22:19Z")

</div>

I am using Julia v1.7 and Flux as well as Optimisers are updated to date. I want to run the following code but getting a freeze not-defined error. julia\> m = (x = (\[1.0\], 2.0), y = \[3.0\]); julia\> s = Optimisers.setup(…

---

## [Franklin website background error on deployment](https://discourse.julialang.org/t/franklin-website-background-error-on-deployment/93629)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 1\
**Last updated:** [January 27, 2023, 2:06pm UTC](https://discourse.julialang.org/t/franklin-website-background-error-on-deployment/93629 "2023-01-27T14:06:48Z")

</div>

Franklin website background image is visible in live server but not on gh-pages. How to make background image visible on gh-pages also ? :unamused: LIVE SERVER look GH pages look below The content of Franklin.…

---

## [Flux How to convert model weights to Float16](https://discourse.julialang.org/t/flux-how-to-convert-model-weights-to-float16/93630)

<div class="topic-metadata">

**Author:** [@reachtarunhere](https://discourse.julialang.org/u/reachtarunhere)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 2:01pm UTC](https://discourse.julialang.org/t/flux-how-to-convert-model-weights-to-float16/93630 "2023-01-27T14:01:54Z")

</div>

m = Dense(10, 2) # now the initialized weights are Float32 type. m2 = Dense(rand(Float16, 2, 10)) # works When I init the weights it is fine but I have an existing complex model with many layers and I would like Float1…

---

## [Retrieving an array from a Ptr{Ptr{Cvoid}}](https://discourse.julialang.org/t/retrieving-an-array-from-a-ptr-ptr-cvoid/93611)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 11\
**Last updated:** [January 27, 2023, 1:51pm UTC](https://discourse.julialang.org/t/retrieving-an-array-from-a-ptr-ptr-cvoid/93611 "2023-01-27T13:51:52Z")

</div>

Hi! I have a Julia wrapper function that calls a C function from a shared library. This C function updates an output structure databuf, which is an instance of mutable struct MTKt\_DataBuffer nline::Cint nsample…

---

## [How to make xylabel LaTeXString with ternary operator?](https://discourse.julialang.org/t/how-to-make-xylabel-latexstring-with-ternary-operator/93626)

<div class="topic-metadata">

**Author:** [@YH\_Ko](https://discourse.julialang.org/u/YH_Ko)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 1:12pm UTC](https://discourse.julialang.org/t/how-to-make-xylabel-latexstring-with-ternary-operator/93626 "2023-01-27T13:12:09Z")

</div>

I’m trying to visualize contour over heatmap example of Makie from following reference. Here, I want to change xlabel and ylabel to LaTexString style. \[original code\] axs = \[Axis(fig\[1, j\], aspect=1, xlabel=“x”, yl…

---

## [Low rank tensor computation](https://discourse.julialang.org/t/low-rank-tensor-computation/93627)

<div class="topic-metadata">

**Author:** [@ga72kud](https://discourse.julialang.org/u/ga72kud)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 12:30pm UTC](https://discourse.julialang.org/t/low-rank-tensor-computation/93627 "2023-01-27T12:30:38Z")

</div>

I want to generate a rank-1 tensor with Julia for some tensor decomposition. As for SVD and linear combination of singular values and orthogonal basis vectors, one can decompose a matrix by a sum like the sum of singular…

---

## [Module does'nt find other modules by the keyword using](https://discourse.julialang.org/t/module-doesnt-find-other-modules-by-the-keyword-using/93625)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 1\
**Last updated:** [January 27, 2023, 12:34pm UTC](https://discourse.julialang.org/t/module-doesnt-find-other-modules-by-the-keyword-using/93625 "2023-01-27T12:34:02Z")

</div>

Hello, good morning. I’m having an issue building a custom module, that I’ll use to automate some things for machine learning. There are functions in my module that cant find another modules present in the environtment: …

---

## [Long compilation time of own code](https://discourse.julialang.org/t/long-compilation-time-of-own-code/93618)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 5\
**Last updated:** [January 27, 2023, 12:24pm UTC](https://discourse.julialang.org/t/long-compilation-time-of-own-code/93618 "2023-01-27T12:24:34Z")

</div>

I am getting a very long TTFX on my own code. This is new territory for me. I profiled the compilation and first run, and the profiler reports large amounts of time spent on the call value\_∂{1,Ny}(...) (which does perfe…

---

## [Performance regression with StaticArrays?](https://discourse.julialang.org/t/performance-regression-with-staticarrays/93555)

<div class="topic-metadata">

**Author:** [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Replies:** 5\
**Last updated:** [January 27, 2023, 11:53am UTC](https://discourse.julialang.org/t/performance-regression-with-staticarrays/93555 "2023-01-27T11:53:41Z")

</div>

Why in this example, the @SVector and @MVector macros both make performance worse? Code: (you can copy and paste into REPL) using BenchmarkTools using StaticArrays using Random function g1(T) levels = @SVector T\[.…

---

## [ODEProblem gives error when using symbolic maps for parameters](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509)

<div class="topic-metadata">

**Author:** [@Lucalino](https://discourse.julialang.org/u/Lucalino)\
**Replies:** 4\
**Last updated:** [January 27, 2023, 11:50am UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509 "2023-01-27T11:50:13Z")

</div>

Hi, I am trying to solve an ODEProblem for which I want to provide parameters in the form of a dictionary Dict{Symbol, Any}. This used to work in the past but now I get the following error message: ArgumentError: This p…

---

## [Plot! inside a function](https://discourse.julialang.org/t/plot-inside-a-function/93597)

<div class="topic-metadata">

**Author:** [@jimmmm](https://discourse.julialang.org/u/jimmmm)\
**Replies:** 6\
**Last updated:** [January 27, 2023, 11:28am UTC](https://discourse.julialang.org/t/plot-inside-a-function/93597 "2023-01-27T11:28:14Z")

</div>

So, to keep things on a plot (like Matlab’s “hold on”), you call plot as plot!(…). If I make a function such as function plotsomething(input) intermediate result = do something with input plot(intermediate result) e…

---

## [Julia dict and haskey](https://discourse.julialang.org/t/julia-dict-and-haskey/93621)

<div class="topic-metadata">

**Author:** [@ditfurth](https://discourse.julialang.org/u/ditfurth)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 11:00am UTC](https://discourse.julialang.org/t/julia-dict-and-haskey/93621 "2023-01-27T11:00:39Z")

</div>

Hi all, I am reading the documentation of Dict and haskey(), but I cannot figure this out. I want to create a dictionary, where I want to be able to feed in an Integer, and then get the corresponding Float64. Thus, I …

---

## [What Packages in Julia can Create Piston Moving in a Cylinder Animation?](https://discourse.julialang.org/t/what-packages-in-julia-can-create-piston-moving-in-a-cylinder-animation/93492)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 6\
**Last updated:** [January 27, 2023, 10:49am UTC](https://discourse.julialang.org/t/what-packages-in-julia-can-create-piston-moving-in-a-cylinder-animation/93492 "2023-01-27T10:49:47Z")

</div>

Hi all, I have no MWE or codes at all, but perhaps there is someone who already made it here. I want to create this https://miro.medium.com/max/640/0\*URlUh\_RUelxpA\_QJ.gif How exactly should I start? is Julia able to…

---

## [Pandas value\_counts() equivalent in base Julia or in Data frame package?](https://discourse.julialang.org/t/pandas-value-counts-equivalent-in-base-julia-or-in-data-frame-package/93620)

<div class="topic-metadata">

**Author:** [@dove88](https://discourse.julialang.org/u/dove88)\
**Replies:** 1\
**Last updated:** [January 27, 2023, 10:31am UTC](https://discourse.julialang.org/t/pandas-value-counts-equivalent-in-base-julia-or-in-data-frame-package/93620 "2023-01-27T10:31:43Z")

</div>

Hello I am interested in Datascience and now i am using Julia for Data analysis with python. I have a question, How can we get the count of each categorical values in an array(dataframe subset) in Julia? For. Eg. we…

---

## [Printf with variable number of digits](https://discourse.julialang.org/t/printf-with-variable-number-of-digits/93589)

<div class="topic-metadata">

**Author:** [@Maurizio\_Tomasi](https://discourse.julialang.org/u/Maurizio_Tomasi)\
**Replies:** 6\
**Last updated:** [January 27, 2023, 10:18am UTC](https://discourse.julialang.org/t/printf-with-variable-number-of-digits/93589 "2023-01-27T10:18:19Z")

</div>

I am trying to write some code that computes some number up to some precision and prints it with the correct number of digits. I tried the following: using Printf function print\_number(x, err) numofdigits = ceil(In…

---

## [DiffEqFlux and Lux/Flux](https://discourse.julialang.org/t/diffeqflux-and-lux-flux/82457)

<div class="topic-metadata">

**Author:** [@Adam\_Davis](https://discourse.julialang.org/u/Adam_Davis)\
**Replies:** 7\
**Last updated:** [January 27, 2023, 9:18am UTC](https://discourse.julialang.org/t/diffeqflux-and-lux-flux/82457 "2023-01-27T09:18:29Z")

</div>

I’m getting an error using sciml to train a DiffEqFlux tutorial. I used the same exact code with some modifications last summer with no problems but can’t seem to find a solution. I am using Julia v.1.7.1 using DiffEq…

---

## [Construction and Simulation of Cascaded Circuits as two-port](https://discourse.julialang.org/t/construction-and-simulation-of-cascaded-circuits-as-two-port/93604)

<div class="topic-metadata">

**Author:** [@Shreeya\_Savant](https://discourse.julialang.org/u/Shreeya_Savant)\
**Replies:** 1\
**Last updated:** [January 27, 2023, 9:11am UTC](https://discourse.julialang.org/t/construction-and-simulation-of-cascaded-circuits-as-two-port/93604 "2023-01-27T09:11:17Z")

</div>

Is it possible to implement two port RLC network using ModelingToolkit in Julia?

---

## [Issue while using basic functions in julia](https://discourse.julialang.org/t/issue-while-using-basic-functions-in-julia/93607)

<div class="topic-metadata">

**Author:** [@nethaji8](https://discourse.julialang.org/u/nethaji8)\
**Replies:** 4\
**Last updated:** [January 27, 2023, 8:17am UTC](https://discourse.julialang.org/t/issue-while-using-basic-functions-in-julia/93607 "2023-01-27T08:17:29Z")

</div>

Dear julia community, I am a beginner in julia can you please explain to me why I am facing the following problems…? 1. #code a = \[1 2 3; 4 5 6\] map(x -\> println(a), \[1,2\]) #output in notebook \[1 2 3; 4 5 6\] \[1 2 3; …

---

## [Lazy columns in dataframes?](https://discourse.julialang.org/t/lazy-columns-in-dataframes/93599)

<div class="topic-metadata">

**Author:** [@ggggggggg](https://discourse.julialang.org/u/ggggggggg)\
**Replies:** 6\
**Last updated:** [January 27, 2023, 7:53am UTC](https://discourse.julialang.org/t/lazy-columns-in-dataframes/93599 "2023-01-27T07:53:28Z")

</div>

When I think about using DataFrames or similar data science packages, I always worry about potential to calculate column C from an existing dataset, then calculate column D from C, then I can recalculate C and have D be …

---

## [Can revise track local folder?](https://discourse.julialang.org/t/can-revise-track-local-folder/93495)

<div class="topic-metadata">

**Author:** [@baizhan](https://discourse.julialang.org/u/baizhan)\
**Replies:** 10\
**Last updated:** [January 27, 2023, 1:36am UTC](https://discourse.julialang.org/t/can-revise-track-local-folder/93495 "2023-01-27T01:36:00Z")

</div>

I have some project myproject, and I want to use some local package test, so I orgnize my files like this: myproject ├── Manifest.toml ├── Project.toml └── src ├── myproject.jl └── test ├── Project.toml…

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

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