On Saturday, 5 May 2018 10:59:13 UTC+5:30, John Ladasky wrote:
> On Friday, May 4, 2018 at 9:13:02 PM UTC-7, Sharan Basappa wrote:
> > I am new to Python and using it to learn machine learning.
> >
> > Below is a sample program I am running to plot IRIS data set.
> > The code runs but no plot com
On Friday, May 4, 2018 at 9:13:02 PM UTC-7, Sharan Basappa wrote:
> I am new to Python and using it to learn machine learning.
>
> Below is a sample program I am running to plot IRIS data set.
> The code runs but no plot comes up. I am not sure what the issue is with the
> code.
>
> # Imports
>
I am new to Python and using it to learn machine learning.
Below is a sample program I am running to plot IRIS data set.
The code runs but no plot comes up. I am not sure what the issue is with the
code.
# Imports
from matplotlib import pyplot as plt
from sklearn.datasets import load_iris
import
On Fri, 04 May 2018 14:38:54 -0600, Ian Kelly wrote:
> On Fri, May 4, 2018 at 11:04 AM, Steven D'Aprano
> wrote:
[...]
>> My guess is that they were thinking that there's no need to complicate
>> itemgetter for this use-case when it is just as easy to write up a
>> quick lambda to do the job.
>
On Fri, 04 May 2018 15:27:02 +0200, Thomas Jollans wrote:
spamgetter = (lambda seq, i=2, fallback="spam":
> ... seq[i] if abs(i) < len(seq) or i == -len(seq)
> ... else fallback)
spamgetter("abcd", i=-4)
> 'a'
spamgetter("abcd")
> 'c'
spamgett
On Fri, 04 May 2018 15:27:16 +0200, Antoon Pardon wrote:
>> I might be slow today, but I cannot see how to write a clear, obvious,
>> efficient lambda that provides functionality equivalent to itemgetter
>> with a default value.
[...]
> This seems to work:
>
> f = (lambda seq: (list(seq) + 3 * [
On 04/05/18 22:38, Ian Kelly wrote:
> On Fri, May 4, 2018 at 11:04 AM, Steven D'Aprano
> wrote:
>> On Fri, 04 May 2018 09:17:14 -0600, Ian Kelly wrote:
>>
>>> On Fri, May 4, 2018 at 7:01 AM, Steven D'Aprano
>>> wrote:
Here are the specifications:
* you must use lambda, not def;
>>>
On Fri, May 4, 2018 at 11:04 AM, Steven D'Aprano
wrote:
> On Fri, 04 May 2018 09:17:14 -0600, Ian Kelly wrote:
>
>> On Fri, May 4, 2018 at 7:01 AM, Steven D'Aprano
>> wrote:
>>> Here are the specifications:
>>>
>>> * you must use lambda, not def;
>>
>> Why? This seems like an arbitrary constraint
I forgot to mention that when running on Linux (displaying back on
Windows), the Python 3 version (3.6.4, Tk 8.6) does cover all three
screens. The Windows Python 2.7.14 version with Tk 8.5 has problems.
--
https://mail.python.org/mailman/listinfo/python-list
I have a little typing watcher (buggy as can be, nearly 20 years old):
https://github.com/smontanaro/python-bits/tree/master/watch
It does the trick most of the time, so I ignore the bugs for the most part.
I had to drag it out last week after my wrists started flairing up again. I
moved it to P
On Fri, 04 May 2018 09:17:14 -0600, Ian Kelly wrote:
> On Fri, May 4, 2018 at 7:01 AM, Steven D'Aprano
> wrote:
>> Here are the specifications:
>>
>> * you must use lambda, not def;
>
> Why? This seems like an arbitrary constraint.
You'll have to ask the two core devs. In my post, in the part y
On Sat, May 5, 2018 at 1:17 AM, Ian Kelly wrote:
> On Fri, May 4, 2018 at 7:01 AM, Steven D'Aprano
> wrote:
>> Here are the specifications:
>>
>> * you must use lambda, not def;
>
> Why? This seems like an arbitrary constraint.
>
> def itemgetter2(*items, default):
> return lambda seq: tuple(
On Fri, May 4, 2018 at 7:01 AM, Steven D'Aprano
wrote:
> Here are the specifications:
>
> * you must use lambda, not def;
Why? This seems like an arbitrary constraint.
> * the lambda must take a single function, the sequence you want to
> extract an item from;
>
> * you can hard-code the index
On 04-05-18 15:01, Steven D'Aprano wrote:
> A re-occurring feature request is to add a default to itemgetter and
> attrgetter. For example, we might say:
>
> from operator import itemgetter
> f = itemgetter(1, 6, default="spam") # proposed feature
> f("Hello World!") # returns ('e', 'W')
> f("He
On 2018-05-04 15:01, Steven D'Aprano wrote:
> A re-occurring feature request is to add a default to itemgetter and
> attrgetter. For example, we might say:
>
> from operator import itemgetter
> f = itemgetter(1, 6, default="spam") # proposed feature
> f("Hello World!") # returns ('e', 'W')
> f(
A re-occurring feature request is to add a default to itemgetter and
attrgetter. For example, we might say:
from operator import itemgetter
f = itemgetter(1, 6, default="spam") # proposed feature
f("Hello World!") # returns ('e', 'W')
f("Hello") # returns ('e', 'spam')
Two senior deve
On Thu, 03 May 2018 19:47:37 +, Robert Latest via Python-list wrote:
> Hello,
>
> I don't understand the behavior of the code below. Why does the dict
> property "a" of both objects contain the same keys? This is only if
> "a=dict" is in the initializer. If I put self.a = dict() into the init
thank you for the advice: depending on the value of PYTHONPATH (version
2.7, 3.5, or unset), tensorflow stops with 3 different error traps
2018-05-04 7:55 GMT+02:00 dieter :
> Chris Angelico writes:
> > ...
> > Somewhere, you have a mismatch of versions. Make sure you're using the
> > same Pytho
18 matches
Mail list logo