On Fri, Jul 18, 2014 at 5:04 PM, Joseph Martinot-Lagarde < joseph.martinot-laga...@m4x.org> wrote:
> Le 18/07/2014 22:46, Chris Barker a écrit : > > On Fri, Jul 18, 2014 at 1:15 PM, Joseph Martinot-Lagarde > > <joseph.martinot-laga...@m4x.org > > <mailto:joseph.martinot-laga...@m4x.org>> wrote: > > > > In addition, > > you have to use AltGr on some keyboards to get the brackets. > > > > > > If it's hard to type square brackets -- you're kind of dead in the water > > with Python anyway -- this is not going to help. > > > > -Chris > > > Welcome to the azerty world ! ;) > > It's not that hard to type, just a bit more involved. My biggest problem > is that you have to type the opening and closing bracket for each line, > with a comma in between. It will always be harder and more error prone > than a single semicolon, whatever the keyboard. > > My use case is not teaching but doing quick'n'dirty computations with a > few values. Sometimes these values are copy-pasted from a space > separated file, or from a printed array in another console. Having to > add comas and bracket makes simple computations less easy. That's why I > often use Octave for these. > my copy paste approaches for almost quick'n'dirty (no semicolons): given: a b c 1 2 3 4 5 6 7 8 9 (select & Ctrl-C) >>> pandas.read_clipboard(sep=' ') a b c 0 1 2 3 1 4 5 6 2 7 8 9 >>> np.asarray(pandas.read_clipboard()) array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=int64) >>> pandas.read_clipboard().values array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=int64) arr = np.array('''\ 1 2 3 4 5 6 7 8 9'''.split(), float).reshape(-1, 3) the last is not so quick and dirty but reusable and reused. Josef > > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion