« first day (4208 days earlier)      last day (741 days later) » 
00:00 - 21:0021:00 - 22:00

12:50 AM
@AndrasDeak--СлаваУкраїні I'm getting used to the new icons. They have grown on me
and I just realized they are in the old position in the top bar, even.
 
 
3 hours later…
Wes
3:34 AM
multirprocessing is confusing as hell
it looks like pipes should have a timeout or something but apparently they don't
 
 
4 hours later…
7:46 AM
I added a new canonical to SOpython: sopython.com/canon/151/…
pardon the formatting; the editor was clearly not designed for mobile
 
7:57 AM
Does Python have a data structure that supports constant time random selection (ie choose an element at random) and constant time add and delete of elements?
 
ordered-set should do it
 
@Aran-Fey interesting! How do you sample a random element from an ordered set?
 
random.choice
 
Wow. I will try it out. Thank yoy
 
Never mind, I had a look at the source code and it's internally implemented with a dict and a list...
 
8:11 AM
How does it support deleting an element in constant time from the list?
 
It doesn't, that's why I said never mind
 
This provides O(1) lookups by index at the expense of O(N) deletion, as well as slightly faster iteration.
:(
 
8:34 AM
Now I'm starting to doubt if such a data structure is even possible
 
8:59 AM
I guess it would be possible if you could index into a dict's storage array.
What exactly do you need it for?
 
I suspect that if you want set /dict-like O(1) insertion, deletion & lookup, the best you can do for the random selection is O(log(n)).
How big is this set? How much do its contents change? If you want lots of random selections without many changes, then choosing from a list may be acceptable. But if you need to rebuild the list frequently, that's pretty useless. OTOH, if the set is small, doing a random islice may be fast enough, even though it's O(n)
 
Wes
9:26 AM
does python have a way to reference a package directly without the import at the top of the file?
 
@Wes import elsewhere
But that should be avoided
 
Wes
does that mean i can import inside of a function only, rather than the entire file?
 
Yes, but do that only if you really have to. And it will still import during first execution.
Only use cases I've seen for this so far are optional dependencies and breaking import cycles
So why do you not want to import at the top?
 
Wes
will it import to the file level anyway, or locally within the function body?
 
Wes
9:37 AM
i am not sure, i am trying to clean up the imports
 
Wes
given this has a prefix:
from json import JSONDecodeError

why
from json import load

is not
from json import json_load
or why "JSONDecodeError" is not just called "DecodeError" ?
 
probably because you see exceptions outside context
Whereas with functions you know where you imported them from
Any part of your code should be able to handle all sorts of exceptions at the same time (JSON decode error, Unicode decode error etc) whereas you don't have to keep 3 kinds of load functions at the same time.
 
Wes
that is a good guess, but still.
 
you can do from json import load as json_load if you want your code to be more confusing
Well, not confusing. Verbose.
definitely choose that over moving the import inside the function that needs it
If you have your own load() function then it's especially OK to rename json's load on import
 
Wes
9:44 AM
if it works i'll just import within the function body, where the function is actually used
 
@Wes no
Apr 7 at 15:24, by MisterMiyagi
There's a a fine balance between helping people so they can become good programmers, and helping them so they can stay crap programmers.
 
Wes
i don't know what peppa the pig says
 
Wes
i am not writing imports the top of the file and half a mile below using them
how does that make any sense
 
Your problem is that you have a file that's half a mile long
 
9:46 AM
Because it's how Python code is expected to be written, and thus how it's expected to be read. Scattering imports all over the code will trip people reading your code. E.g. they see load, they go to the top and see it's not imported. They search for def load(): nothing. Then "hmm...".
 
Wes
@Aran-Fey php has one global symbol per file. i thought the python way was to put entire programs in single files
 
You can say you'll be the only one reading your code... but that just means you like to write crap code for your own benefit. In which case you do you. But if you want to learn decent Python you should strive to write idiomatic code.
@Wes nope
 
Well, he's got a point. Annoying side effect of circular imports, probably
People write too much code in a single file all the time, even though they shouldn't
 
@Aran-Fey but that's not how it should be, just what often people do, right?
 
Yeah
 
9:49 AM
See also poop and 10 million flies
 
Wes
 
But even if your file is half a mile long, I don't see the problem with writing the imports at the top. Most of the time you can easily recognize modules by name, so who cares where they were imported? I don't go looking for an import if I see collections somewhere in the code
 
Wes
not my code
 
That is very excessive even for a python program
 
9:51 AM
@Aran-Fey that assumes keeping namespaces
Probably not the PHP way
@Wes what Aran means is using import json and json.loads(s) later in your code
+1 for that
 
Wes
i am not following
so you agree that "import json" could be more local, rather than "at the top of the file"?
 
Wes
O_O
 
import json at the top and json.loads in the function
Namespaces are one honking great idea
 
Wes
import json
from json import JSONDecodeError
this really grinds my gears
 
9:59 AM
so keep json.JSONDecodeError, whatever
 
Wes
but not as much as writing json.JSONDecodeError
 
Do you actually need to catch json.JSONDecodeError?
 
Wes
it's just an example
 
Or is this an academic concern?
 
@Wes there are so many bad combinations you can come up with, you really don't need our assistance to rate all of them
 
Wes
10:01 AM
with import used within a function body i can keep the clutter localized
but for some reason imports have to stay at the top
ftr, it's the same in php, except in php you have 1 class per file so it doesn't matter much
 
Also keep in mind that some parts of the standard library are older than the people using it.
 
Wes
i noticed naming is all over the place
 
I have a higher-order function, my_pickle_module.load, which optionally takes a function as input. If the user provides a function, they need a way to fall back to the default function. The standard for similar modules (like pickle) is to have a class, so you can override the function(s) you want and fall back to the default behavior with super():
class CustomUnpickler(my_pickle_module.Unpickler):
    def find_module(self, module_name):
        return super().find_module(module_name)

CustomUnpickler().load(b'foobar')
My problem is that I don't have such a class, and I don't really want to create one just for this purpose. I'm thinking of using this kind of design instead:
def custom_find_module(module_name):
    return my_pickle_module.find_module(module_name)

my_pickle_module.load(b'foobar', find_module=custom_find_module)
Opinions?
(Actually, I do have such a class, but it's only used internally, and because of the way it's architectured, cannot be made part of the public API. So I'd essentially have to create a public version of it, which would be kind of messy and confusing)
 
Wes
old php meme recreated for python
 
10:18 AM
I really don't understand why this is such a big deal for you
 
Wes
10:32 AM
i am just trying to write readable code, but that backfired
 
Like I said, if you're the only one reading your code you can do whatever. If you collaborate with others you should use idiomatic style because that's what Python programmers have trained themselves to read easily.
 
 
1 hour later…
Wes
11:58 AM
just realized that with

mymodule.py
    import json

then i can do

mymodule.json.load()
 
I take it you think that's something you should do?
 
Wes
i am adding underscores like an idiot trying to hide the clutter and here's python disagreeing with that
 
Wes
sorry i forgot critiquing python is like insulting someone's mom :P
you know what the main difference between php and python is? php is fully aware it's ***** :P
 
Yeah, the import system is easily the worst part of python
 
12:13 PM
I thought that was packaging
 
That's part of it
 
12:24 PM
Think about this for a second:
my_package/
    __init__.py
    my_module.py

# __init__.py
from .my_module import *

# user_code.py
from my_package import *
print(my_module)  # works
Awesome, isn't it?
 
Wes
what does from .my_module do? imports a subpackage?
 
Imports a submodule of the current package, yeah
If you've defined an __all__ in my_module.py, you've essentially wasted your time. It should actually be in __init__.py
 
@Aran-Fey I think I've deleted module names like that in the past. Also, the mistake is star importing in user code :P
@Aran-Fey surely __all__ is still respected, with the addition of my_module itself?
If you have bar in my_module that's not in __all__ you don't have bar in user_code, right?
 
Sure, it's respected. But why bother with __all__ if you end up with undesired clutter anyway?
 
The clutter is just the one name my_module, is it not?
 
12:30 PM
@AndrasDeak--СлаваУкраїні Correct
correct x2
 
So I don't get why it's a waste of time. Have 50 names, weed out 40 with __all__. You get 11 if you star import, the 10 you want plus the module.
Quirky to del my_module in __init__.py but I don't see why it makes __all__ even remotely pointless.
 
Sure, it's not a complete waste of time, but 1) it's like leaving 5% of your rubbish in the bin instead of emptying it all and 2) it's so unexpected that most people do it without even realizing
 
Yeah, 5% trash is a lot better than 100%, and it's a good thing if you spend two minutes emptying the bin pinning down your public API
I'd expect no __all__ plus star imports causing much larger problems all the time. Using third-party libraries pulled in through submodules for instance.
 
My point is, the system is a mess. Maybe not so much of a mess that it causes problems all the time, but still a mess
 
I don't have much experience with it so I'm not challenging that, I was just trying to understand the example here.
 
Wes
12:59 PM
no difference between class Bla(object): and class Bla:, right?
that is surprisingly hard to google
 
In proper python, no. Use latter.
 
1:20 PM
Oh lord, I have a heisenbug in the trickiest part of my code. Wish me luck :(
 
 
4 hours later…
4:55 PM
uh oh
 
Wes
ImportError: cannot import name 'xxxxx' from partially initialized module 'xxxx'
oh dear
 
import cycle
Serves you well for using more than one file
 
Wes
i suspect it would work if i put imports within the function bodies
because they would be evaluated when the function is called, right?
 
if you have an actual cycle, better get rid of the import cycle properly. do you have an import cycle?
 
Wes
i guess
might be a simple type hint causing this lol?
 
5:06 PM
@Wes if you're importing types from another module, yes. You can try postponing evaluation with string annotations
foo: Foo -> foo: 'module.Foo'
Or something like that
On python 3.9+(?) using from __future__ import annotations would work instead
 
Wes
do i need to add that to postpone evaluation of type hints?
 
If those are the source of your cyclic import, that's one way to remove those imports, so yeah
 
Wes
so i got my answer, this is why python programs are usually single files
 
Can't wait for a bunch of libraries to explode when the deferred annotations become default
from __future__ import annotations

class Foo:
    x: 'Foo'

print(Foo.__annotations__)
# {'x': "'Foo'"}
 
The future annotations might need a dumb typing if around the import...
 
5:12 PM
There is also:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
    from .machines import Machine
    from .collections import MachineGroup, ProductGroup
 
7 hours ago, by Aran-Fey
Well, he's got a point. Annoying side effect of circular imports, probably
@roganjosh yeah, that dumb typing if
 
Which I had to resort to when I couldn't avoid cyclic imports just for the sake of type hinting. I hate it at the top of my modules :'(
 
@Wes "usually" is still off the mark
 
I want to say "no that's not why, because there's a trivial workaround for this", but... it probably is why. It leads to too many stupid problems, even if they're not hard to solve
 
Wes
so from __future__ import annotations at the top of the file should just work or do i need to change imports to strings like -> 'package.bar.Baz' ?
 
5:16 PM
@Aran-Fey alternatives would require understanding the problem
 
Wes
@AndrasDeak--СлаваУкраїні maybe. my experience is limited. so far i've only seen massive files
feels bad to critique open source code so i wont :B
 
@Wes Either use strings or the __future__ thing, but preferably not both
 
I've been in this forest for days and all I've seen are trees :P
 
Neither one will directly solve your problem though, because the import is still there
 
Wes
what does from future import annotations do exactly? doesn't appear to be working
 
5:23 PM
It makes x: Foo equivalent to x: 'Foo'
 
Wes
what about imports, do they get converted too?
 
no
 
Wes
i have file1 import file2.Foo
and file2 import file1.Bar
should i put them in the same file?
 
This is just too abstract for us to reasonably answer. "Maybe"? It seems like the whole thing needs a refactor if it was (IIRC) like 30k lines of code
 
5:30 PM
If the import is only there for your type annotations, then no. Otherwise, maybe. Depends.
 
Sorry, 23,896. I blew it out of all proportions in my memory :P
 
Wes
that was luckily not my code lol
 
Still seems to be the code that you're working with? Or are your circular imports now in something else entirely?
 
Wes
something else entirely
the reason i have module a depending on b, and b depending on a, is just imports that i am using in type hints
 
Then that has been addressed in multiple ways in the discussion we've just had
 
5:33 PM
 
Wes
all right, i'll try that
 
Good news: I figured out the reason for my heisenbug. Now I just have to fix it...
 
@Aran-Fey just observe it
 
I did. It's alive :(
Maybe I should look away again... might have better luck on my next observation?
 
What does it mean when a matrix is not invertable
 
5:40 PM
Imagine if that was a viable bug-fixing strategy. Developers all around the world start fixing bugs by blinking rapidly until the code fixes itself
 
Looks like there's cyanide on PyPI. Importing that might help with the bug
 
@GarlicPancake just that, it means the matrix's inverse doesn't exist. you may want to read up on invertible matrices to see why this is possible
 
Cabage! There is a way to adjust the matplotlib's plot tick labels spacement non-linearly, relatively to each group (each group has a different color) that is, between the first tick labels group and the second tick labels group, between the second tick labels group and the third tick labels group, and so on?
I forgot to say, and consequently, adjusting the spacing between the plot bars referring to each group of ticks.
 
@GarlicPancake what's the context? Depending on the role of the matrix it might mean many things.
 
I believe that if this is possible, it should be done using the ax.yaxis.set_major_locator method, but I couldn't find a way to do it according to the possible parameters.
 
5:51 PM
0
Q: Finding Inverse of an array not working via sympy inverse Python

GarlicPancakeCan Someone explain why the inverse isn't working with this matrix but it is with the commented part? from sympy import Matrix list = [] print(self.get_key_secret()) key = np.array([7, 23, 21, 9, 19, 3, 15, 15, 12]).reshape(3, 3) # key = np.array( # [[3, 10, 20], # [20, 9, 17], # [9, ...

Question is written a little weird
 
Wes
6:05 PM
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from aaa.bbb import Test

def my_func() -> Test:
    pass

NameError: name 'Test' is not defined
 
Makes you wonder why we were harping on and on about turning annotations into strings, doesn't it
 
Wes
if that's sarcasm it's totally wasted as i have no clue as what's going on
i thought TYPE_CHECKING would work alone?
or do i need strings as well?
this is absolutely insane btw
 
Wes
ok thanks for the extra sarcasm
 
I can explain in 15 minutes
 
6:10 PM
It's really getting ridiculous though. You have literally reached the point where you're surprised that you can't access a class that you didn't import
 
Wes
but is it more ridiculous than python trying to evaluate the return type which it doesn't actually check
 
It's not a competition, you know?
 
Wes
i thought "if TYPE_CHECKING" was equivalent to writing if False: ie something that would hide the import to python while still keeping it readable to the type checkers
since python is not actually doing anything with it
 
@Wes that's what it does, and that's why it changed your cyclic import into a NameError
 
It's different from if False:, because even a static analyzer wouldn't execute code inside an if like that
 
6:20 PM
1. problem: in `def my_func() -> Test:` you need `from aaa.bbb import Test`. That's the source of your cyclic import. Solution: avoid that import during runtime.
2. solution 1: `def my_func() -> 'aaa.bbb.Test':`, there's no `Test` for Python to be confused about, and type checkers can evaluate that string.
3. solution 2: `def my_func() -> Test` but with postponed evaluation of annotations, i.e. `from __future__ import annotations`. Postponing means runtime treats annotations as if they were strings, see solution 1. However type checkers will be confused, not knowing where `Test` comes from.
right, there's no markdown in multiline chat
people who actually know typing, please correct me if I'm wrong
Not sure what happens if you use the future import and def my_func() -> aaa.bbb.Test. Or you might need the TYPE_CHECKING-guarded import even for solution 1.
 
For clarity, everything after "see solution 1" applies to both solution 1 and solution 2
 
OK, that's it, thanks
i.e. no magic
So to put it better: you need some module import in the TYPE_CHECKING guard, and you need either a string-valued annotation that matches this import, or the future import. Because the future import merely makes all annotations implicitly stringy.
 
@Marco I'm back in front of a laptop, but your question was not clear to me. Are you just talking about tick placement? Or a bar plot (histogram)? In either case whatever you want should be possible, I just don't know what that is.
 
It's about tick placement AND barplot (barh plot)...
 
6:27 PM
Do you have a really short MCVE or a mockup of what you want?
 
I'll do it, I'll send it soon
 
Wes
so basically no matter what this is going to be ugly as hell
 
Wes
this is the last python program i write i am sure so it's no biggie, but honestly i find mind blowing people find this acceptable and have to work with this
even php is better than this, and we all know how bad php is
 
6:31 PM
many people choose not to use typing, for what it's worth
and people who try to use them properly tend to say that it's hard to do correctly
 
The thing about python is that you should never be an early adopter. And if it's been less than 10 years, then it's still early
 
Wes
you mean early adopting new features?
 
@Wes New stdlib modules, mostly. Things built directly into the language, like match or assignment expressions will still be the same in 10 years...
 
Same vibes as newbies coming to SO and Python's bug tracker to complain about new previously undiscovered bugs that they've just found while playing with an interpreter
 
Wes
6:45 PM
def func() -> "AAA" | "BBB" | None:
TypeError: unsupported operand type(s) for |: 'str' and 'str'
just kill me already
i am off to bed :'(
 
Python 3.10.4+ (heads/3.10:c7e6bfd150, Apr 24 2022, 19:50:56) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class AAA: pass
...
>>> class BBB: pass
...
>>> def func() -> AAA | BBB | None: ...
...
>>> import typing
>>> typing.get_type_hints(func)
{'return': __main__.AAA | __main__.BBB | None}
Get rid of strings, then either make AAA and BBB available immediately or do from __future__ import annotations.
 
7:02 PM
for what it's worth one could move the pipes inside the strings and mypy would stay happy
 
@AndrasDeak--СлаваУкраїні i.postimg.cc/T3Dqz0C5/EXAMPLE-OK.png
 
String annotations always felt like a bit of a hack
 
@vaultah so it fits typing? ;)
@Marco thanks. So it's not about ticks per se, you want to move the bars themselves
 
Yes, the two things
 
@AndrasDeak--СлаваУкраїні touché
 
7:05 PM
@Marco You can use the left keyword parameter to position the bars explicitly. I'm pretty sure ticks will always be placed in the middle of each bar.
oops, not left, hold on
the horizontalness is tripping me up
 
haha
ok
 
Yeah, just play with y and maybe height if you have to
if your y are not uniformly placed then the bars won't be uniformly placed either
and if you need bars of varying height for some reason, just pass in an array the same size as y
This is assuming we're talking about pyplot.barh. If it's something fancier that does the grouping for you then we need to look at the docs of that.
 
So I just need to play with y in respect to the specific bars that I want more space below their?
 
If you're using pyplot.barh, yes. One naive way to do that is for you to do something like for i in range(3, y.size, 3): y[i:] += 0.5 # or whatever shift
 
why am i getting errors with ValueError: inverse of 1862 (mod 26) does not exist and Matrix is not invertible (mod 26) [[ 7 23  4]
 [14 19 10]
 [15  5  2]]
 
7:12 PM
@GarlicPancake sorry, I forgot to get back to you. We ask that you don't ask for help here with fresh questions on the main site.
But the answer to your question is because there is no 3x3 matrix that when multiplied by your original matrix (mod 26) produces a unit matrix.
 
@AndrasDeak--СлаваУкраїні Yes, I am using pyplot.barh... but I think I would need to do it individually anyway, because each group has a specific number of bars. But it wouldn't be a problem, because there are very few spacing adjustments needed. Finally, adjusting this y in relation to each bar, will the tick relative to that bar also adjust automatically?
 
@Marco I would expect that they will, but you'll have to check
 
Perfect, thank you very much, I'll check it...
 
@Marco you need something like y += np.repeat(offset * np.arange(number_of_groups), multiplicity_of_each_group) in the general case
(where offset is the amount to shift each group with, 0.5 in my previous example, and y.size == multiplicity_of_each_group * number_of_groups)
 
Oh yeah, that is great, thanks...
 
7:18 PM
no problem, let me know if it actually works
 
Ok
 
(repeat is actually also an ndarray method...)
 
@AndrasDeak--СлаваУкраїні, each group occurs after 4, 5, 3, 4 and 3 of theirs bar plots respectively, so what I should put in multiplicity_of_each_group?
 
If you mean that the groups have 4, 5, 3, 4, 3 bars, respectively, then exactly these numbers in a list. multiplicities = [4, 5, 3, 4, 3]; number_of_groups = len(multiplicities)
 
5 groups in total
Oh, now I understood, thanks... I'll check it now
 
@AndrasDeak--СлаваУкраїні (just answering, yes, you understood correctly)
@AndrasDeak--СлаваУкраїні
 
Like this?
graph = plt.barh(data.CLASSES,data.QUANTITY, color = colors, y+= np.repeat(0.5 * np.arange(5), np.array([4, 5, 3, 4, 3])))
 
no
1. What do you think `y` is?
2. you can't use `+=` as an expression
 
1. a parameter from plt.barh()?
 
7:42 PM
Good. Which parameter?
 
Height?
 
Come again?
Just open up the docs of barh, that might help
 
y : scalar or array-like
The y coordinates of the bars. See also align for the alignment of the bars to the coordinates.
 
Make sure you look at the signature too.
 
@AndrasDeak--СлаваУкраїні Oh, ok
@AndrasDeak--СлаваУкраїні about the second fact, so I can't use the y+= directly this way?
 
When you tried to run that line, did you get a syntax error or did you not?
 
yes
 
Well, a syntax error is Python's clearest was to tell you that you can't do that.
 
Ok, I did this:
y = np.repeat(0.5 * np.arange(5), np.array([4, 5, 3, 4, 3]))

graph = plt.barh(y, data.CLASSES,data.QUANTIDADE, color = colors)
 
7:50 PM
And did it work?
 
It ran without errors, but the plot was weird
:(
 
OK. So instead of trying random things, can you try stepping back a bit and trying to think of your problem and what I recommended as a solution?
 
@AndrasDeak--СлаваУкраїні that?
 
the only thing you have to figure out is what "y" is in your original plot, and what offset you need given your original data
@Marco no
 
Humm...
Can you please take a little look on this MCVE (lines 71-72) (colab.research.google.com/drive/…)?
 
8:05 PM
I don't see line numbers
but I see the same lines you posted here
 
@AndrasDeak--СлаваУкраїні Should be some colab config
@AndrasDeak--СлаваУкраїні Ok
You can edit
 
I can, but I don't want to. I want you to understand what we're trying to do.
 
ok
Unfortunately I couldn't understand and make it work. But it's alright. Thanks anyway.
 
@Marco do you understand what "y" is in the concept of your horizontal bar plot?
 
y coordinate
 
8:13 PM
Which one is that?
 
What?
 
Which coordinate is y? In a 2d plot you have a horizontal and a vertical axis.
 
Vertical?
 
Yes.
So what data do you have on your vertical axis?
 
Some classes, why?
 
8:15 PM
What do you mean "why"? Everything we're doing is changing your data on the vertical axis so that your bars get shifted along the vertical axis. That's exactly why I've been talking about adding something to y.
 
Yes, I know that, and... ?
 
If you know that then you should know that y is supposed to be the data you have on the vertical axis, i.e. your classes. Although I'm realising now that your "classes" are probably strings that get plotted as categoricals, which breaks my solution as-is.
 
@AndrasDeak--СлаваУкраїні I wrote "why" because I did not see the purpose about the data labeling question.
 
Not too broken, just slightly broken.
@Marco it's primarily not a label! It's the y coordinate. But pyplot is "smart" enough that if you give it string data, it generates integer data values to plot, and uses the strings as categorical labels.
This is why pyplot.barh has y as the first positional parameter. This is why I told you to look at the signature.
The docs has barh(y, ...), your code has barh(thing.CLASSES, ...).
 
@AndrasDeak--СлаваУкраїні Yes, they are strings
 
8:19 PM
These are the kinds of relationships you have to learn to see if you want to get fix future problems.
 
@AndrasDeak--СлаваУкраїні ok
@AndrasDeak--СлаваУкраїні right
You thought that they were numbers?
 
indeed
that's why I suggested adding the offsets
 
Even with the labels as strings?
 
yes, I didn't realise the importance of that feature in your mockup
you could've set those manually with set_yticklabels
No matter: you just have to generate a numerical range to plot by, and set the labels manually just like barh does with categorical (string) data.
 
@AndrasDeak--СлаваУкраїні would that affect the respective plots as well?
 
8:22 PM
@Marco not sure what you are asking
 
You commented about adjusting tick spacing, each tick corresponds to a bar, so that's why I'm asking this.
@AndrasDeak--СлаваУкраїні hmm
 
@Marco forget that message for now, that was just what I thought when I looked at your problem at the start
 
ok
 
so first replace thing.CLASSES with np.arange(len(thing.CLASSES)) in the call to barh() and tell me what you see
 
ok
I see this: ibb.co/bbCG8X6
 
8:29 PM
uuuh I doubt that
Why are there negative numbers in there?
Can you show me the call to barh()?
 
@AndrasDeak--СлаваУкраїні I don't know, they just appeared
I'll be back in a few minutes
 
00:00 - 21:0021:00 - 22:00

« first day (4208 days earlier)      last day (741 days later) »