# Latest

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

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

**Page:** 833

---

## [Parsing of mysql timestamps](https://discourse.julialang.org/t/parsing-of-mysql-timestamps/77587)

<div class="topic-metadata">

**Author:** [@linusheinz](https://discourse.julialang.org/u/linusheinz)\
**Replies:** 8\
**Last updated:** [December 20, 2022, 9:42pm UTC](https://discourse.julialang.org/t/parsing-of-mysql-timestamps/77587 "2022-12-20T21:42:50Z")

</div>

I am querying a table with a timestamp: data = DBInterface.execute(database, sql) df = DataFrame(data) But I get : ERROR: LoadError: error parsing DateTime from "2022-01-04 15:08:44.171540" Stacktrace: How can I tell…

---

## [Concatenation causes multiplication type problems in ReverseDiff](https://discourse.julialang.org/t/concatenation-causes-multiplication-type-problems-in-reversediff/91917)

<div class="topic-metadata">

**Author:** [@fratrik](https://discourse.julialang.org/u/fratrik)\
**Replies:** 0\
**Last updated:** [December 20, 2022, 9:38pm UTC](https://discourse.julialang.org/t/concatenation-causes-multiplication-type-problems-in-reversediff/91917 "2022-12-20T21:38:19Z")

</div>

using ReverseDiff function f(a) b = \[1 2\] (\[a; b\]\*a)\*a \[a\*a\*a; b\*a\*a\] \[a\*a; b\*a\]\*a # error here 0 end ReverseDiff.hessian(f, randn(2, 2)) the code fails on \[a\*a; b\*a\]\*a with message ERROR: L…

---

## [How do I use isassigned with a Matrix?](https://discourse.julialang.org/t/how-do-i-use-isassigned-with-a-matrix/91913)

<div class="topic-metadata">

**Author:** [@shlemas](https://discourse.julialang.org/u/shlemas)\
**Replies:** 2\
**Last updated:** [December 20, 2022, 9:17pm UTC](https://discourse.julialang.org/t/how-do-i-use-isassigned-with-a-matrix/91913 "2022-12-20T21:17:51Z")

</div>

isassigned is confusing me a bit. For simple arrays, it works as I would expect: julia\> b = \[1,2,3\] 3-element Vector{Int64}: 1 2 3 julia\> isassigned(b, 3) true julia\> isassigned(b, 4) # out of bounds, should retu…

---

## [Best way to use Cgl within JuMP?](https://discourse.julialang.org/t/best-way-to-use-cgl-within-jump/91900)

<div class="topic-metadata">

**Author:** [@Maxime](https://discourse.julialang.org/u/Maxime)\
**Replies:** 2\
**Last updated:** [December 20, 2022, 8:24pm UTC](https://discourse.julialang.org/t/best-way-to-use-cgl-within-jump/91900 "2022-12-20T20:24:38Z")

</div>

Hi, I need to use the Cgl cut generation library GitHub - coin-or/Cgl: Cut Generator Library from within JuMP. In particular I want to generate KnapsackCover cuts. I managed to install Cgl, however I’m struggling beca…

---

## [Looking for good way to save system image while developing Base](https://discourse.julialang.org/t/looking-for-good-way-to-save-system-image-while-developing-base/91912)

<div class="topic-metadata">

**Author:** [@ndinsmore](https://discourse.julialang.org/u/ndinsmore)\
**Replies:** 0\
**Last updated:** [December 20, 2022, 7:59pm UTC](https://discourse.julialang.org/t/looking-for-good-way-to-save-system-image-while-developing-base/91912 "2022-12-20T19:59:00Z")

</div>

Does anyone have a good workflow for making archives or backups of a system image built using make while making change to Base? I know that Revise can work for some situations, but I would love to have a good way to rol…

---

## [Problem with module dependencies in Pluto](https://discourse.julialang.org/t/problem-with-module-dependencies-in-pluto/91882)

<div class="topic-metadata">

**Author:** [@adannenberg](https://discourse.julialang.org/u/adannenberg)\
**Replies:** 6\
**Last updated:** [December 20, 2022, 7:01pm UTC](https://discourse.julialang.org/t/problem-with-module-dependencies-in-pluto/91882 "2022-12-20T19:01:08Z")

</div>

I created a module, myModule, that requires the Dates and DataFrames packages. Fwiw, my src directory contains only myModule.jl which looks like: module myModule using DataFrames, Dates export myDF function my…

---

## [Descend into any \`AbstractDict\`](https://discourse.julialang.org/t/descend-into-any-abstractdict/91908)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 6:49pm UTC](https://discourse.julialang.org/t/descend-into-any-abstractdict/91908 "2022-12-20T18:49:26Z")

</div>

Continuing the discussion from Looking for a key in a nested dict: I guess he means: convert(AbstractDict, nestedDict)

---

## [Why documentation links are often broken?](https://discourse.julialang.org/t/why-documentation-links-are-often-broken/91903)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 3\
**Last updated:** [December 20, 2022, 5:15pm UTC](https://discourse.julialang.org/t/why-documentation-links-are-often-broken/91903 "2022-12-20T17:15:09Z")

</div>

It is quite common to find broken Julia package documentation links, like this one (see docs stable link in the page): Why is this and is there a workaround?

---

## [Space varying parameter in PDE with ModelingToolkit](https://discourse.julialang.org/t/space-varying-parameter-in-pde-with-modelingtoolkit/91897)

<div class="topic-metadata">

**Author:** [@touste](https://discourse.julialang.org/u/touste)\
**Replies:** 4\
**Last updated:** [December 20, 2022, 4:49pm UTC](https://discourse.julialang.org/t/space-varying-parameter-in-pde-with-modelingtoolkit/91897 "2022-12-20T16:49:39Z")

</div>

Hi all, I’m trying to solve a simple 1D heat equation. As the future objective is to identify some parameters of this equation, I use ModellingToolkit with MethodOfLines as showcased in the example of the MethodOfLines …

---

## [ControlSystems + PlotlyJS](https://discourse.julialang.org/t/controlsystems-plotlyjs/91898)

<div class="topic-metadata">

**Author:** [@stephans3](https://discourse.julialang.org/u/stephans3)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 4:44pm UTC](https://discourse.julialang.org/t/controlsystems-plotlyjs/91898 "2022-12-20T16:44:42Z")

</div>

I just read in this post Implementation of matlab function in julia (Root locus plot) that it is possible to use ControlSystems together with PlotlyJS. To use plotlyjs() the package PlotlyJShas to be installed. using…

---

## [Why does BlueStyle do this?](https://discourse.julialang.org/t/why-does-bluestyle-do-this/91871)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 14\
**Last updated:** [December 20, 2022, 4:31pm UTC](https://discourse.julialang.org/t/why-does-bluestyle-do-this/91871 "2022-12-20T16:31:53Z")

</div>

I recently read through BlueStyle (and YASGuide). There are a few items that feel strange to me. I’ll probably conform and get used to it, but I could use some more convincing on why my way is worse. Why so vertical? …

---

## [K-Medoids clustering in BetaML.jl](https://discourse.julialang.org/t/k-medoids-clustering-in-betaml-jl/91865)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 10\
**Last updated:** [December 20, 2022, 3:11pm UTC](https://discourse.julialang.org/t/k-medoids-clustering-in-betaml-jl/91865 "2022-12-20T15:11:31Z")

</div>

I am trying to use BetaML.jl package to cluster a set of data using K-Medoids algorithm; however, it seems to not classify the data into all classes. For example: using Random, BetaML X = rand(MersenneTwister(1234), 10…

---

## [Accessing backend of Model](https://discourse.julialang.org/t/accessing-backend-of-model/91689)

<div class="topic-metadata">

**Author:** [@Maxime](https://discourse.julialang.org/u/Maxime)\
**Replies:** 3\
**Last updated:** [December 20, 2022, 3:08pm UTC](https://discourse.julialang.org/t/accessing-backend-of-model/91689 "2022-12-20T15:08:44Z")

</div>

Hi, I have a usecase where I have to copy models. I also need to access the solver backend. However it seems that I can either use direct\_model(), so I have access to the backend, but can’t copy the model, or i can use …

---

## [Confused about how Zygote pullback handles tuple-valued loss functions](https://discourse.julialang.org/t/confused-about-how-zygote-pullback-handles-tuple-valued-loss-functions/91899)

<div class="topic-metadata">

**Author:** [@bgroenks](https://discourse.julialang.org/u/bgroenks)\
**Replies:** 2\
**Last updated:** [December 20, 2022, 3:05pm UTC](https://discourse.julialang.org/t/confused-about-how-zygote-pullback-handles-tuple-valued-loss-functions/91899 "2022-12-20T15:05:07Z")

</div>

I noticed something odd (or at least that I don’t understand) with the Zygote.pullback method. Let’s consider a very simple test case: using Zygote losses, back = Zygote.pullback(x -\> (sum(x), sum(x)), \[1.0,1.0\]) Her…

---

## [Feature request: How about pattern matching of \`Base.Filesystem.readdir\`?](https://discourse.julialang.org/t/feature-request-how-about-pattern-matching-of-base-filesystem-readdir/91887)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 7\
**Last updated:** [December 20, 2022, 2:55pm UTC](https://discourse.julialang.org/t/feature-request-how-about-pattern-matching-of-base-filesystem-readdir/91887 "2022-12-20T14:55:44Z")

</div>

It’s Base.Filesystem.readdir in julia: https://docs.julialang.org/en/v1/base/file/#Base.Filesystem.readdir It’s readdir in R, it has exclude argument as regular expression: readdir(dir::AbstractString=pwd(); join…

---

## [Comparison between Julia and Python Random Forest Regression](https://discourse.julialang.org/t/comparison-between-julia-and-python-random-forest-regression/28033)

<div class="topic-metadata">

**Author:** [@richie96](https://discourse.julialang.org/u/richie96)\
**Replies:** 6\
**Last updated:** [December 20, 2022, 12:55pm UTC](https://discourse.julialang.org/t/comparison-between-julia-and-python-random-forest-regression/28033 "2022-12-20T12:55:34Z")

</div>

Hi, I am doing a comparison between Julia and Python by converting a python ML code into Julia and the documenting the time taken by both the codes for different sections. I am using Random Forest algorithm. In Julia, I…

---

## [Training with Mutating Arrays](https://discourse.julialang.org/t/training-with-mutating-arrays/91876)

<div class="topic-metadata">

**Author:** [@ChrisVL1](https://discourse.julialang.org/u/ChrisVL1)\
**Replies:** 2\
**Last updated:** [December 20, 2022, 11:48am UTC](https://discourse.julialang.org/t/training-with-mutating-arrays/91876 "2022-12-20T11:48:06Z")

</div>

I am writing a training function that requires a loop as my loss is the difference between call prices which I need to calculate for various strikes using a loop. However, this results in a mutating array, how do I get a…

---

## [Best way to define lat, lon -or- projected x,y points that play nicely with GeoInterface.jl](https://discourse.julialang.org/t/best-way-to-define-lat-lon-or-projected-x-y-points-that-play-nicely-with-geointerface-jl/89795)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 4\
**Last updated:** [December 20, 2022, 10:04am UTC](https://discourse.julialang.org/t/best-way-to-define-lat-lon-or-projected-x-y-points-that-play-nicely-with-geointerface-jl/89795 "2022-12-20T10:04:52Z")

</div>

Is there a general standard for defining lat lon and projected points in the GeoJulia community such that they play nicely across packages? I looked through the GeoInterface.jl documentation but wasn’t able to locate tha…

---

## [\[ANN\] BosonSampling.jl - A package for multiphoton interference](https://discourse.julialang.org/t/ann-bosonsampling-jl-a-package-for-multiphoton-interference/91891)

<div class="topic-metadata">

**Author:** [@benoitseron](https://discourse.julialang.org/u/benoitseron)\
**Replies:** 0\
**Last updated:** [December 20, 2022, 9:45am UTC](https://discourse.julialang.org/t/ann-bosonsampling-jl-a-package-for-multiphoton-interference/91891 "2022-12-20T09:45:38Z")

</div>

I am pleased to announce BosonSampling.jl, a free open source package for high performance simulation and numerical investigation of boson samplers and, more generally, multi-photon interferometry. Underlying building b…

---

## [Training Neural SDEs with Mutating Arrays](https://discourse.julialang.org/t/training-neural-sdes-with-mutating-arrays/91877)

<div class="topic-metadata">

**Author:** [@ChrisVL1](https://discourse.julialang.org/u/ChrisVL1)\
**Replies:** 2\
**Last updated:** [December 20, 2022, 7:46am UTC](https://discourse.julialang.org/t/training-neural-sdes-with-mutating-arrays/91877 "2022-12-20T07:46:51Z")

</div>

I am writing a training function that requires a loop as my loss is the difference between call prices which I need to calculate for various strikes using a loop. However, this results in a mutating array, how do I get a…

---

## [Mutating Arrays in Training](https://discourse.julialang.org/t/mutating-arrays-in-training/91879)

<div class="topic-metadata">

**Author:** [@ChrisVL1](https://discourse.julialang.org/u/ChrisVL1)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 7:45am UTC](https://discourse.julialang.org/t/mutating-arrays-in-training/91879 "2022-12-20T07:45:49Z")

</div>

I am writing a training function that requires a loop as my loss is the difference between call prices which I need to calculate for various strikes using a loop. However, this results in a mutating array, how do I get a…

---

## [Inconsistency in derivative computation in Symbolics.jl](https://discourse.julialang.org/t/inconsistency-in-derivative-computation-in-symbolics-jl/91880)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 7:43am UTC](https://discourse.julialang.org/t/inconsistency-in-derivative-computation-in-symbolics-jl/91880 "2022-12-20T07:43:03Z")

</div>

These two ways of computing the derivative in Symbolics return the same result, as expected: using Symbolics @variables k1,k2 julia\> Symbolics.derivative(^,(k1,k2),Val(1)) k2\*(k1^(k2 - 1)) julia\> Symbolics.derivative(…

---

## [New package to map GRIB files to the Unidata's Common Data Model v4 following the CF Conventions](https://discourse.julialang.org/t/new-package-to-map-grib-files-to-the-unidatas-common-data-model-v4-following-the-cf-conventions/32375)

<div class="topic-metadata">

**Author:** [@cvitolo](https://discourse.julialang.org/u/cvitolo)\
**Replies:** 18\
**Last updated:** [December 20, 2022, 7:23am UTC](https://discourse.julialang.org/t/new-package-to-map-grib-files-to-the-unidatas-common-data-model-v4-following-the-cf-conventions/32375 "2022-12-20T07:23:46Z")

</div>

Hi all! At ECMWF we are starting a new project/Julia package to map GRIB files (typically used in meteorology and climate science) to the Unidata’s Common Data Model v4 following the CF Conventions. We have already a P…

---

## [Julia Meetup in Mumbai?](https://discourse.julialang.org/t/julia-meetup-in-mumbai/91598)

<div class="topic-metadata">

**Author:** [@viralbshah](https://discourse.julialang.org/u/viralbshah)\
**Replies:** 7\
**Last updated:** [December 20, 2022, 4:50am UTC](https://discourse.julialang.org/t/julia-meetup-in-mumbai/91598 "2022-12-20T04:50:18Z")

</div>

Any Julia enthusiasts from Mumbai around here? I am going to be in Mumbai next week and the week after that, and was wondering if there’s interest in a meetup in Mumbai. Does anyone have a venue they can host a meetup a…

---

## [Generator slow when passed as argument](https://discourse.julialang.org/t/generator-slow-when-passed-as-argument/91606)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 6\
**Last updated:** [December 20, 2022, 3:02am UTC](https://discourse.julialang.org/t/generator-slow-when-passed-as-argument/91606 "2022-12-20T03:02:47Z")

</div>

(Julia 1.9.0-alpha1) Why is this? julia\> @btime let x=(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8) ns=propertynames(x) NamedTuple{ns}(map(n-\>getproperty(x,n), ns)) end 1.000 ns (0 allocations: 0 byt…

---

## [Type-Instability when calling \`fieldtypes\`](https://discourse.julialang.org/t/type-instability-when-calling-fieldtypes/91881)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 0\
**Last updated:** [December 20, 2022, 1:05am UTC](https://discourse.julialang.org/t/type-instability-when-calling-fieldtypes/91881 "2022-12-20T01:05:21Z")

</div>

Is there a way to make fieldtypes not be type-unstable here? julia\> struct Foo{A,B} a::A; b::B end julia\> ft1(o::T) where T = Tuple(T.types) ft1 (generic function with 1 method) julia\> ft2(o::T) where T = fieldtypes(T…

---

## [How to save a file with the log of Gurobi solver in JuMP](https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874)

<div class="topic-metadata">

**Author:** [@Luiz\_Monteiro](https://discourse.julialang.org/u/Luiz_Monteiro)\
**Replies:** 2\
**Last updated:** [December 20, 2022, 12:55am UTC](https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874 "2022-12-20T00:55:20Z")

</div>

Hi, I’m running a MIP model using JuMP with solver Gurobi and need to save the solution log as a file. I tryed to read Gurobi documentation bur couldnt find how to do this in Julia. Is there a way to do it? Thanks in …

---

## [@which not found in my module](https://discourse.julialang.org/t/which-not-found-in-my-module/91878)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 12:09am UTC](https://discourse.julialang.org/t/which-not-found-in-my-module/91878 "2022-12-20T00:09:37Z")

</div>

I would like to use @which from within a macro to find out where a particular function is called from. But I get a message that the macro is not found. How is this handled? Thanks.

---

## [Is it Possible to Create a Snippet / small plot inside a plot with Plots?](https://discourse.julialang.org/t/is-it-possible-to-create-a-snippet-small-plot-inside-a-plot-with-plots/91838)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [December 19, 2022, 10:50pm UTC](https://discourse.julialang.org/t/is-it-possible-to-create-a-snippet-small-plot-inside-a-plot-with-plots/91838 "2022-12-19T22:50:31Z")

</div>

Hi all, I want to create a plot like this: I have the code to create the big plot (the circumscribed polygon), is it possible to crop a part and put it at designated area, like putting a legend on topleft? Then put t…

---

## [Is there a generic way to remove the unit from a number?](https://discourse.julialang.org/t/is-there-a-generic-way-to-remove-the-unit-from-a-number/33277)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 8\
**Last updated:** [December 19, 2022, 10:31pm UTC](https://discourse.julialang.org/t/is-there-a-generic-way-to-remove-the-unit-from-a-number/33277 "2022-12-19T22:31:46Z")

</div>

Is there a generic way to remove the unit from a number? Note that x / oneunit(x) sometimes doesn’t work. For instance, if you look at the Furlongs testing example defined in https://github.com/JuliaLang/julia/blob/mast…

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

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