ojalgo-user Mailing List for oj! Algorithms (Page 15)
Mathematics, linear algebra and optimisation
Brought to you by:
apete
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
(14) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2005 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
(8) |
Feb
(1) |
Mar
(2) |
Apr
(11) |
May
(6) |
Jun
|
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(4) |
Nov
|
Dec
(11) |
2008 |
Jan
(22) |
Feb
(4) |
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(17) |
Dec
(5) |
2009 |
Jan
(15) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
(4) |
Jun
(5) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(14) |
Dec
|
2010 |
Jan
(3) |
Feb
(5) |
Mar
(2) |
Apr
(19) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
(10) |
May
(1) |
Jun
(15) |
Jul
(1) |
Aug
|
Sep
|
Oct
(13) |
Nov
(9) |
Dec
(11) |
2012 |
Jan
|
Feb
(1) |
Mar
(9) |
Apr
(23) |
May
(16) |
Jun
(9) |
Jul
(13) |
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(12) |
Mar
(7) |
Apr
(24) |
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(3) |
Oct
(16) |
Nov
(7) |
Dec
(3) |
2014 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
(2) |
2015 |
Jan
(11) |
Feb
(10) |
Mar
(1) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(4) |
Sep
(6) |
Oct
(3) |
Nov
(15) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
|
Mar
(18) |
Apr
(5) |
May
(9) |
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
(5) |
Oct
(2) |
Nov
|
Dec
(5) |
2017 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
(12) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(1) |
2018 |
Jan
(5) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(4) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bruno D. <ab...@ma...> - 2012-04-21 11:01:57
|
Dear Anders Peterson and Stefan Richthofer, let's first establish the feasibility of Jumpy before really starting the project. The problems I've seen so far -- thanks also to Stefan -- are: - unsigned long ist not supported. BigInteger as a replacement would be much too slow because of the many boxed heap object allocations (mentioned, for example, in Bloch, Effective Java, Item 49: Prefer primitive types to boxed primitives). How often are unsigned longs used in Numpy? - Java arrays (and, sadly, Collections as well) have a maximum length of Integer.MAX_VALUE which is specified as 2^31 - 1. Numpy arrays, on the other hand, can be much larger. If we use a 1-dimensional array with strides in Jumpy, this would limit our quadratic matrices to only 46340 rows in Java. But the design of Numpy is seriously tied to this underlying 1-dimensional array implementation, and applications might allocate larger ndarrays than we can provide. - We cannot support the Array interface (__array_interface__, __array_struct__) for interfacing C libraries and the ctypes foreign function interface of Python. How often are they used in Numpy applications, in particular Machine Learning applications? - I'm not sure whether Numpy applications sometimes need to perform casts of the contained data array to a different kind of array without copying, e.g. from int[] to byte[] with 4 times the size or vice versa. This could not be supported in Java. And please forgive me for asking this question: Are there any benchmarks comparing ojAlgo to C/Fortran/C++ Linear Algebra libraries, e.g. Eigen (see http://eigen.tuxfamily.org/index.php?title=Benchmark )? Best regards Bruno Daniel Anders Peterson wrote: > I created a module ExtNumPy in the already existing SVN repository. (Actually tried switching to Git but couldn't get it working.) You'll have to give me your Google user names if you want commit rights to that repository. /Anders > > On 20 apr 2012, at 16:32, Bruno Daniel wrote: > >> Dear Stefan, >> >>> I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. >>> If you don't know, I would offer to check this out. >> >> You can always use properties in Python. It's explained here, for example: >> http://bytebaker.com/2009/03/31/python-properties-vs-java-access-modifiers/ >> >>> The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. >> >> Reshaping and striding are seldom used explicitly by the users, but very often >> implicitly. >> >> Best regards >> Bruno Daniel >> >> Stefan Richthofer wrote: >>>> There are many fields which are all public. We could replace them by set- >>>> and >>>> get methods in the adapter. >>> >>> I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. >>> If you don't know, I would offer to check this out. >>> >>> The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. >>> >>> cheers >>> >>> Stefan >>> -- >>> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir >>> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de >>> >>> ------------------------------------------------------------------------------ >>> For Developers, A Lot Can Happen In A Second. >>> Boundary is the first to Know...and Tell You. >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> http://p.sf.net/sfu/Boundary-d2dvs2 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2012-04-20 21:52:31
|
I created a module ExtNumPy in the already existing SVN repository. (Actually tried switching to Git but couldn't get it working.) You'll have to give me your Google user names if you want commit rights to that repository. /Anders On 20 apr 2012, at 16:32, Bruno Daniel wrote: > Dear Stefan, > >> I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. >> If you don't know, I would offer to check this out. > > You can always use properties in Python. It's explained here, for example: > http://bytebaker.com/2009/03/31/python-properties-vs-java-access-modifiers/ > >> The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. > > Reshaping and striding are seldom used explicitly by the users, but very often > implicitly. > > Best regards > Bruno Daniel > > Stefan Richthofer wrote: >>> There are many fields which are all public. We could replace them by set- >>> and >>> get methods in the adapter. >> >> I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. >> If you don't know, I would offer to check this out. >> >> The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. >> >> cheers >> >> Stefan >> -- >> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir >> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: Bruno D. <ab...@ma...> - 2012-04-20 14:33:05
|
Dear Stefan, > I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. > If you don't know, I would offer to check this out. You can always use properties in Python. It's explained here, for example: http://bytebaker.com/2009/03/31/python-properties-vs-java-access-modifiers/ > The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. Reshaping and striding are seldom used explicitly by the users, but very often implicitly. Best regards Bruno Daniel Stefan Richthofer wrote: >> There are many fields which are all public. We could replace them by set- >> and >> get methods in the adapter. > > I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. > If you don't know, I would offer to check this out. > > The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. > > cheers > > Stefan > -- > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Stefan R. <Ste...@gm...> - 2012-04-20 14:21:26
|
Could not resist to have a quick look into jython-doc... http://wiki.python.org/jython/JythonFaq/ExtendingJython chapter "How do I emulate Jython object attribute access with a Java class?" seems to hold what we need. Overwriting public PyObject __findattr__(String name); should allow for a suitable adapter. Have a nice weekend! Stefan > There are many fields which are all public. We could replace them by set- > and > get methods in the adapter. I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. If you don't know, I would offer to check this out. The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. cheers Stefan -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a |
From: Stefan R. <Ste...@gm...> - 2012-04-20 14:17:19
|
> There are many fields which are all public. We could replace them by set- > and > get methods in the adapter. I'm not sure, how jython deals with it. Can it map field-access in python-code to getter/setter methods on java-side? If not, numpy-python code would run only with an additional preprocessing. If you don't know, I would offer to check this out. The rest of your post sounds good to me after a first view, although I must admit, that I only used rather basic numpy-stuff yet. For instance I very rarely used reshaping and never used striding, so I might lack enough experience to see problems in your approach. cheers Stefan -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de |
From: Stefan R. <Ste...@gm...> - 2012-04-20 13:32:10
|
> Getting some small application that (only) depends on NumPy to run on > Jython would be a proof of concept. > > I looked at the ndarray "interface". Some things look a bit scary... Are > all the attributes and methods mentioned on that page public and > non-optional? In fact I did not really have a look at that interface yet. Once I tried to setup a kind of "jumpy" by using original numpy through JNI. But for this I focused on the communication between python and its native extensions, especially numpy. So it was another layer of interfaces, I dived into (that were mainly the headers occuring in python.h). > Currently ojAlgo supports double, BigDecimal, ComplexNumber and > RationalNumber elements with the ArrayAnyD class. Are other types required? I think, numpy is also capable of having integer-matrices/arryas/however, but no RationalNumber (in the sense of an integer-tuple (numerator, denominator)). Maybe we can use RationalNumber with denominator=1, but including integer matrices into the support might be of better performance. There is another thing about python/numpy/jython. Because python/numpy supports unsigned long and double primitives, the de-facto number range of these types can not be fully covered by java primitive types. Jython covers this issue by mapping these types to BigNumber-types. I'm not sure, whether there could arise any problems from this for "jumpy" - just keep it in mind. > How about I create a sandbox version control system (for experimental > code) over at http://code.google.com/p/ojalgo/ > > What do you prefer: Subversion, Git or Mercurial? I think its a nice idea, though I can't promise that I will have very much time for this project. From work I only know Mercurial, so I don't have an educated opinion, which one is best. Stefan > On 19 apr 2012, at 22:21, B.D. wrote: > > > Dear Mr. Peterson, > > > >> Don't talk too much - just do it. Start with the most simple case. > > > > yes, you're right. I think this is a nice collection of simple unit > tests for > > me: http://www.scipy.org/Numpy_Example_List > > > > See you later, > > B.D. > > > > > > Anders Peterson wrote: > >> Let's call it Jumpy... > >> > >> Since I'm not a python/jython/numpy/scipy user I think someone else > should take the lead here. > >> > >> Don't talk too much - just do it. Start with the most simple case. > >> > >> I'm definitely interested in ways to make ojAlgo more useful. > >> > >> /Anders > >> > >> > >> On 19 apr 2012, at 15:39, Stefan Richthofer wrote: > >> > >>> Hello together, > >>> I also often thought about the idea to have a numpy-substitute for > java, but always feared the enormous effort related to it. > >>> > >>> Be aware of the high Potential of the idea. > >>> > >>> Having a numpy substitute in java would enable a huge amount of > scientific python-code to run directly in java via jython (maybe with a slight > modification of the imports). > >>> > >>> Jython's main issue keeping it from being very useful is, that it does > not support external (native) libraries written for Python. > >>> > >>> I regard numpy as one of the most important of these and I believe, > that a significant amount of scientific python-code has numpy as the only > non-python-core-dependency and thus could run via jython, if there was a numpy > for java. > >>> > >>> Maybe you could consider a cooperation with the jython-developers at > http://www.jython.org ...? > >>> It should be highly in their interest to have a numpy implementation > for java. > >>> > >>> > >>> Greetings > >>> > >>> Stefan > >>> > >>> > >>> > >>> -------- Original-Nachricht -------- > >>>> Datum: Thu, 19 Apr 2012 13:56:49 +0200 > >>>> Von: Anders Peterson <an...@op...> > >>>> An: oja...@li... > >>>> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? > >>> > >>>> Short anser is yes, but you have to be more specific regarding what > you > >>>> want/need and willing to do some of the work yourself. > >>>> > >>>> ojAlgo has multi/any-dimensional arrays: > >>>> > >>>> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html > >>>> > >>>> Frankly I don't really know what to do with them. I tend to only use > 1- or > >>>> 2-dimensional data structures. I created them because they were a > >>>> generalization of what I needed that *could* become useful. > >>>> > >>>> I guess the various MatrixStore implementations and the > >>>> MatrixStore.Builder does much of what you want, but only for 2-dim > arrays (and with wrong > >>>> syntax). > >>>> > >>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html > >>>> > http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html > >>>> > >>>> In ojAlgo the description of the array shape/structure is fixed as > defined > >>>> in AccessUtils > >>>> > >>>> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html > >>>> > >>>> Would that need to be changed? (I hope not.) > >>>> > >>>> /Anders > >>>> > >>>> > >>>> On 19 apr 2012, at 11:35, B.D. wrote: > >>>> > >>>>> Dear developers, > >>>>> > >>>>> I'm primarily interested in Machine Learning and Data analysis. > Thanks > >>>> for the > >>>>> good work, I appreciate the ojAlgo library very much! However, most > new > >>>>> algorithms and applications in this field are still written in > Python > >>>> for > >>>>> Numpy/Scipy, not Java. I just had an idea: > >>>>> > >>>>> If one could offer classes/interfaces in pure Java with similar > >>>> functionality > >>>>> and names as in > >>>>> > >>>>> http://docs.scipy.org/doc/numpy/reference/ , > >>>>> > >>>>> in particular ndarray > >>>>> > >>>>> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html > >>>>> > >>>>> (e.g. strides in matrices and vectors, transposition, reshaping of > >>>> matrices as > >>>>> a view without copying, many views on the same matrix data), then > one > >>>> could > >>>>> rather easily translate Python programs using Numpy to pure Java > without > >>>>> reinventing the wheel and offer the excellent Python software for > Java > >>>> under > >>>>> the same license as the original. > >>>>> > >>>>> There are syntax limitations in Java, so > >>>>> > >>>>> A[2:5, :] > >>>>> > >>>>> would have to be translated to some intutive name or even a crazy > >>>> mnemonic like > >>>>> > >>>>> A.viewI_c_icI(2, 5) > >>>>> > >>>>> (I = [ or ], > >>>>> i = comma, > >>>>> c = colon, > >>>>> _ = slots for the arguments). > >>>>> > >>>>> What do you think? > >>>>> > >>>>> Best regards > >>>>> B.D. > >>>>> > >>>>> > >>>> > ------------------------------------------------------------------------------ > >>>>> For Developers, A Lot Can Happen In A Second. > >>>>> Boundary is the first to Know...and Tell You. > >>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >>>>> http://p.sf.net/sfu/Boundary-d2dvs2 > >>>>> _______________________________________________ > >>>>> ojAlgo-user mailing list > >>>>> ojA...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > >>>> > >>>> > ------------------------------------------------------------------------------ > >>>> For Developers, A Lot Can Happen In A Second. > >>>> Boundary is the first to Know...and Tell You. > >>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >>>> http://p.sf.net/sfu/Boundary-d2dvs2 > >>>> _______________________________________________ > >>>> ojAlgo-user mailing list > >>>> ojA...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > >>> > >>> -- > >>> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! > > >>> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a > >>> > >>> > ------------------------------------------------------------------------------ > >>> For Developers, A Lot Can Happen In A Second. > >>> Boundary is the first to Know...and Tell You. > >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >>> http://p.sf.net/sfu/Boundary-d2dvs2 > >>> _______________________________________________ > >>> ojAlgo-user mailing list > >>> ojA...@li... > >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > >>> > >>> > >> > >> > >> > ------------------------------------------------------------------------------ > >> For Developers, A Lot Can Happen In A Second. > >> Boundary is the first to Know...and Tell You. > >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >> http://p.sf.net/sfu/Boundary-d2dvs2 > >> _______________________________________________ > >> ojAlgo-user mailing list > >> ojA...@li... > >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > > ------------------------------------------------------------------------------ > > For Developers, A Lot Can Happen In A Second. > > Boundary is the first to Know...and Tell You. > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de |
From: Bruno D. <ab...@ma...> - 2012-04-20 12:50:54
|
Dear Anders Peterson, > I looked at the ndarray "interface". Some things look a bit scary... Are all > the attributes and methods mentioned on that page public and non-optional? Regarding the methods, many of them can be implemented as stride-and-offset shuffling and calculation, for example * ndarray.repeat * ndarray.diagonal * ndarray.reshape * ndarray.flatten * ndarray.swapaxes * ndarray.ravel * ndarray.view Many others (min, argmin, round, sum, mean, var, prod, all, any ...) are easy to add. I hope they cover most of the applications. We'll see. Best regards Bruno Daniel Bruno Daniel wrote: > Dear Anders Peterson, > >> I looked at the ndarray "interface". Some things look a bit scary... Are all >> the attributes and methods mentioned on that page public and non-optional? > > Ok, let's see: > > http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html > There are many fields which are all public. We could replace them by set- and > get methods in the adapter. Most of them are used often. In consider only > real, imag, __array_priority__ as optional: > > "ndarray.flags Information about the memory layout of the array. > ndarray.shape Tuple of array dimensions. > ndarray.strides Tuple of bytes to step in each dimension when traversing an array. > ndarray.ndim Number of array dimensions. > ndarray.data Python buffer object pointing to the start of the array's data. > ndarray.size Number of elements in the array. > ndarray.itemsize Length of one array element in bytes. > ndarray.nbytes Total bytes consumed by the elements of the array. > ndarray.base Base object if memory is from some other object. > ndarray.dtype Data-type of the array's elements. > > ndarray.T Same as self.transpose(), except that self is returned if self.ndim < 2. > ndarray.real The real part of the array. > ndarray.imag The imaginary part of the array. > ndarray.flat A 1-D iterator over the array. > __array_priority__" > > ndarray.strides and ndarray.shape are the most important for creating > views. We would need an additional offset, because there are no pointers to > array parts in Java. > > For instance a vector-view of the third column of an m x n non-view, > row-order matrix A would roughly look like this: > > shape = tuple(m, 1) > offset = 2 * m > base = the same array as in A, no copy > strides = tuple(n) > size = m > ndim = 1 > > The transpose of the same matrix would roughly look like this: > > shape = tuple(m, n) > offset = 0 > base = the same array as in A, no copy > strides = the reverse of A.strides = tuple(1, n) > size = the same as in A > ndim = the same as in A = 2 > > If A is already a view there will be other values in offset and strides. > > These are for interfacing C programs. I hope they are not used too often in > common Numpy programs. Stefan Richthofer, what do you think? > > "The Array Interface. > __array_interface__ Python-side of the array interface > __array_struct__ C-side of the array interface" > ndarray.ctypes An object to simplify the interaction of the array > with the ctypes module." > >> Currently ojAlgo supports double, BigDecimal, ComplexNumber and >> RationalNumber elements with the ArrayAnyD class. Are other types required? > > Integers are quite common. The other types (there are many of them) could be > added later: > http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html#arrays-dtypes > >> How about I create a sandbox version control system (for experimental code) over at http://code.google.com/p/ojalgo/ >> >> What do you prefer: Subversion, Git or Mercurial? > Thanks, Git would be nice, Subversion is also ok. > > Best regards > Bruno Daniel > > Anders Peterson wrote: >> Getting some small application that (only) depends on NumPy to run on Jython would be a proof of concept. >> >> I looked at the ndarray "interface". Some things look a bit scary... Are all the attributes and methods mentioned on that page public and non-optional? >> >> Currently ojAlgo supports double, BigDecimal, ComplexNumber and RationalNumber elements with the ArrayAnyD class. Are other types required? >> >> How about I create a sandbox version control system (for experimental code) over at http://code.google.com/p/ojalgo/ >> >> What do you prefer: Subversion, Git or Mercurial? >> >> /Anders >> >> >> On 19 apr 2012, at 22:21, B.D. wrote: >> >>> Dear Mr. Peterson, >>> >>>> Don't talk too much - just do it. Start with the most simple case. >>> >>> yes, you're right. I think this is a nice collection of simple unit tests for >>> me: http://www.scipy.org/Numpy_Example_List >>> >>> See you later, >>> B.D. >>> >>> >>> Anders Peterson wrote: >>>> Let's call it Jumpy... >>>> >>>> Since I'm not a python/jython/numpy/scipy user I think someone else should take the lead here. >>>> >>>> Don't talk too much - just do it. Start with the most simple case. >>>> >>>> I'm definitely interested in ways to make ojAlgo more useful. >>>> >>>> /Anders >>>> >>>> >>>> On 19 apr 2012, at 15:39, Stefan Richthofer wrote: >>>> >>>>> Hello together, >>>>> I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. >>>>> >>>>> Be aware of the high Potential of the idea. >>>>> >>>>> Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). >>>>> >>>>> Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. >>>>> >>>>> I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. >>>>> >>>>> Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? >>>>> It should be highly in their interest to have a numpy implementation for java. >>>>> >>>>> >>>>> Greetings >>>>> >>>>> Stefan >>>>> >>>>> >>>>> >>>>> -------- Original-Nachricht -------- >>>>>> Datum: Thu, 19 Apr 2012 13:56:49 +0200 >>>>>> Von: Anders Peterson <an...@op...> >>>>>> An: oja...@li... >>>>>> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? >>>>> >>>>>> Short anser is yes, but you have to be more specific regarding what you >>>>>> want/need and willing to do some of the work yourself. >>>>>> >>>>>> ojAlgo has multi/any-dimensional arrays: >>>>>> >>>>>> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html >>>>>> >>>>>> Frankly I don't really know what to do with them. I tend to only use 1- or >>>>>> 2-dimensional data structures. I created them because they were a >>>>>> generalization of what I needed that *could* become useful. >>>>>> >>>>>> I guess the various MatrixStore implementations and the >>>>>> MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong >>>>>> syntax). >>>>>> >>>>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html >>>>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html >>>>>> >>>>>> In ojAlgo the description of the array shape/structure is fixed as defined >>>>>> in AccessUtils >>>>>> >>>>>> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html >>>>>> >>>>>> Would that need to be changed? (I hope not.) >>>>>> >>>>>> /Anders >>>>>> >>>>>> >>>>>> On 19 apr 2012, at 11:35, B.D. wrote: >>>>>> >>>>>>> Dear developers, >>>>>>> >>>>>>> I'm primarily interested in Machine Learning and Data analysis. Thanks >>>>>> for the >>>>>>> good work, I appreciate the ojAlgo library very much! However, most new >>>>>>> algorithms and applications in this field are still written in Python >>>>>> for >>>>>>> Numpy/Scipy, not Java. I just had an idea: >>>>>>> >>>>>>> If one could offer classes/interfaces in pure Java with similar >>>>>> functionality >>>>>>> and names as in >>>>>>> >>>>>>> http://docs.scipy.org/doc/numpy/reference/ , >>>>>>> >>>>>>> in particular ndarray >>>>>>> >>>>>>> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html >>>>>>> >>>>>>> (e.g. strides in matrices and vectors, transposition, reshaping of >>>>>> matrices as >>>>>>> a view without copying, many views on the same matrix data), then one >>>>>> could >>>>>>> rather easily translate Python programs using Numpy to pure Java without >>>>>>> reinventing the wheel and offer the excellent Python software for Java >>>>>> under >>>>>>> the same license as the original. >>>>>>> >>>>>>> There are syntax limitations in Java, so >>>>>>> >>>>>>> A[2:5, :] >>>>>>> >>>>>>> would have to be translated to some intutive name or even a crazy >>>>>> mnemonic like >>>>>>> >>>>>>> A.viewI_c_icI(2, 5) >>>>>>> >>>>>>> (I = [ or ], >>>>>>> i = comma, >>>>>>> c = colon, >>>>>>> _ = slots for the arguments). >>>>>>> >>>>>>> What do you think? >>>>>>> >>>>>>> Best regards >>>>>>> B.D. >>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>>> For Developers, A Lot Can Happen In A Second. >>>>>>> Boundary is the first to Know...and Tell You. >>>>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>>>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>>>>> _______________________________________________ >>>>>>> ojAlgo-user mailing list >>>>>>> ojA...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> For Developers, A Lot Can Happen In A Second. >>>>>> Boundary is the first to Know...and Tell You. >>>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>>>> _______________________________________________ >>>>>> ojAlgo-user mailing list >>>>>> ojA...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>>> >>>>> -- >>>>> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! >>>>> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> For Developers, A Lot Can Happen In A Second. >>>>> Boundary is the first to Know...and Tell You. >>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>>> _______________________________________________ >>>>> ojAlgo-user mailing list >>>>> ojA...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> For Developers, A Lot Can Happen In A Second. >>>> Boundary is the first to Know...and Tell You. >>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>> _______________________________________________ >>>> ojAlgo-user mailing list >>>> ojA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> ------------------------------------------------------------------------------ >>> For Developers, A Lot Can Happen In A Second. >>> Boundary is the first to Know...and Tell You. >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> http://p.sf.net/sfu/Boundary-d2dvs2 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >> >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Bruno D. <ab...@ma...> - 2012-04-20 12:43:54
|
Dear Anders Peterson, > I looked at the ndarray "interface". Some things look a bit scary... Are all > the attributes and methods mentioned on that page public and non-optional? Ok, let's see: http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html There are many fields which are all public. We could replace them by set- and get methods in the adapter. Most of them are used often. In consider only real, imag, __array_priority__ as optional: "ndarray.flags Information about the memory layout of the array. ndarray.shape Tuple of array dimensions. ndarray.strides Tuple of bytes to step in each dimension when traversing an array. ndarray.ndim Number of array dimensions. ndarray.data Python buffer object pointing to the start of the array's data. ndarray.size Number of elements in the array. ndarray.itemsize Length of one array element in bytes. ndarray.nbytes Total bytes consumed by the elements of the array. ndarray.base Base object if memory is from some other object. ndarray.dtype Data-type of the array's elements. ndarray.T Same as self.transpose(), except that self is returned if self.ndim < 2. ndarray.real The real part of the array. ndarray.imag The imaginary part of the array. ndarray.flat A 1-D iterator over the array. __array_priority__" ndarray.strides and ndarray.shape are the most important for creating views. We would need an additional offset, because there are no pointers to array parts in Java. For instance a vector-view of the third column of an m x n non-view, row-order matrix A would roughly look like this: shape = tuple(m, 1) offset = 2 * m base = the same array as in A, no copy strides = tuple(n) size = m ndim = 1 The transpose of the same matrix would roughly look like this: shape = tuple(m, n) offset = 0 base = the same array as in A, no copy strides = the reverse of A.strides = tuple(1, n) size = the same as in A ndim = the same as in A = 2 If A is already a view there will be other values in offset and strides. These are for interfacing C programs. I hope they are not used too often in common Numpy programs. Stefan Richthofer, what do you think? "The Array Interface. __array_interface__ Python-side of the array interface __array_struct__ C-side of the array interface" ndarray.ctypes An object to simplify the interaction of the array with the ctypes module." > Currently ojAlgo supports double, BigDecimal, ComplexNumber and > RationalNumber elements with the ArrayAnyD class. Are other types required? Integers are quite common. The other types (there are many of them) could be added later: http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html#arrays-dtypes > How about I create a sandbox version control system (for experimental code) over at http://code.google.com/p/ojalgo/ > > What do you prefer: Subversion, Git or Mercurial? Thanks, Git would be nice, Subversion is also ok. Best regards Bruno Daniel Anders Peterson wrote: > Getting some small application that (only) depends on NumPy to run on Jython would be a proof of concept. > > I looked at the ndarray "interface". Some things look a bit scary... Are all the attributes and methods mentioned on that page public and non-optional? > > Currently ojAlgo supports double, BigDecimal, ComplexNumber and RationalNumber elements with the ArrayAnyD class. Are other types required? > > How about I create a sandbox version control system (for experimental code) over at http://code.google.com/p/ojalgo/ > > What do you prefer: Subversion, Git or Mercurial? > > /Anders > > > On 19 apr 2012, at 22:21, B.D. wrote: > >> Dear Mr. Peterson, >> >>> Don't talk too much - just do it. Start with the most simple case. >> >> yes, you're right. I think this is a nice collection of simple unit tests for >> me: http://www.scipy.org/Numpy_Example_List >> >> See you later, >> B.D. >> >> >> Anders Peterson wrote: >>> Let's call it Jumpy... >>> >>> Since I'm not a python/jython/numpy/scipy user I think someone else should take the lead here. >>> >>> Don't talk too much - just do it. Start with the most simple case. >>> >>> I'm definitely interested in ways to make ojAlgo more useful. >>> >>> /Anders >>> >>> >>> On 19 apr 2012, at 15:39, Stefan Richthofer wrote: >>> >>>> Hello together, >>>> I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. >>>> >>>> Be aware of the high Potential of the idea. >>>> >>>> Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). >>>> >>>> Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. >>>> >>>> I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. >>>> >>>> Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? >>>> It should be highly in their interest to have a numpy implementation for java. >>>> >>>> >>>> Greetings >>>> >>>> Stefan >>>> >>>> >>>> >>>> -------- Original-Nachricht -------- >>>>> Datum: Thu, 19 Apr 2012 13:56:49 +0200 >>>>> Von: Anders Peterson <an...@op...> >>>>> An: oja...@li... >>>>> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? >>>> >>>>> Short anser is yes, but you have to be more specific regarding what you >>>>> want/need and willing to do some of the work yourself. >>>>> >>>>> ojAlgo has multi/any-dimensional arrays: >>>>> >>>>> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html >>>>> >>>>> Frankly I don't really know what to do with them. I tend to only use 1- or >>>>> 2-dimensional data structures. I created them because they were a >>>>> generalization of what I needed that *could* become useful. >>>>> >>>>> I guess the various MatrixStore implementations and the >>>>> MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong >>>>> syntax). >>>>> >>>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html >>>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html >>>>> >>>>> In ojAlgo the description of the array shape/structure is fixed as defined >>>>> in AccessUtils >>>>> >>>>> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html >>>>> >>>>> Would that need to be changed? (I hope not.) >>>>> >>>>> /Anders >>>>> >>>>> >>>>> On 19 apr 2012, at 11:35, B.D. wrote: >>>>> >>>>>> Dear developers, >>>>>> >>>>>> I'm primarily interested in Machine Learning and Data analysis. Thanks >>>>> for the >>>>>> good work, I appreciate the ojAlgo library very much! However, most new >>>>>> algorithms and applications in this field are still written in Python >>>>> for >>>>>> Numpy/Scipy, not Java. I just had an idea: >>>>>> >>>>>> If one could offer classes/interfaces in pure Java with similar >>>>> functionality >>>>>> and names as in >>>>>> >>>>>> http://docs.scipy.org/doc/numpy/reference/ , >>>>>> >>>>>> in particular ndarray >>>>>> >>>>>> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html >>>>>> >>>>>> (e.g. strides in matrices and vectors, transposition, reshaping of >>>>> matrices as >>>>>> a view without copying, many views on the same matrix data), then one >>>>> could >>>>>> rather easily translate Python programs using Numpy to pure Java without >>>>>> reinventing the wheel and offer the excellent Python software for Java >>>>> under >>>>>> the same license as the original. >>>>>> >>>>>> There are syntax limitations in Java, so >>>>>> >>>>>> A[2:5, :] >>>>>> >>>>>> would have to be translated to some intutive name or even a crazy >>>>> mnemonic like >>>>>> >>>>>> A.viewI_c_icI(2, 5) >>>>>> >>>>>> (I = [ or ], >>>>>> i = comma, >>>>>> c = colon, >>>>>> _ = slots for the arguments). >>>>>> >>>>>> What do you think? >>>>>> >>>>>> Best regards >>>>>> B.D. >>>>>> >>>>>> >>>>> ------------------------------------------------------------------------------ >>>>>> For Developers, A Lot Can Happen In A Second. >>>>>> Boundary is the first to Know...and Tell You. >>>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>>>> _______________________________________________ >>>>>> ojAlgo-user mailing list >>>>>> ojA...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> For Developers, A Lot Can Happen In A Second. >>>>> Boundary is the first to Know...and Tell You. >>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>>> _______________________________________________ >>>>> ojAlgo-user mailing list >>>>> ojA...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>> >>>> -- >>>> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! >>>> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a >>>> >>>> ------------------------------------------------------------------------------ >>>> For Developers, A Lot Can Happen In A Second. >>>> Boundary is the first to Know...and Tell You. >>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>> _______________________________________________ >>>> ojAlgo-user mailing list >>>> ojA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> For Developers, A Lot Can Happen In A Second. >>> Boundary is the first to Know...and Tell You. >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> http://p.sf.net/sfu/Boundary-d2dvs2 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2012-04-20 11:47:16
|
Getting some small application that (only) depends on NumPy to run on Jython would be a proof of concept. I looked at the ndarray "interface". Some things look a bit scary... Are all the attributes and methods mentioned on that page public and non-optional? Currently ojAlgo supports double, BigDecimal, ComplexNumber and RationalNumber elements with the ArrayAnyD class. Are other types required? How about I create a sandbox version control system (for experimental code) over at http://code.google.com/p/ojalgo/ What do you prefer: Subversion, Git or Mercurial? /Anders On 19 apr 2012, at 22:21, B.D. wrote: > Dear Mr. Peterson, > >> Don't talk too much - just do it. Start with the most simple case. > > yes, you're right. I think this is a nice collection of simple unit tests for > me: http://www.scipy.org/Numpy_Example_List > > See you later, > B.D. > > > Anders Peterson wrote: >> Let's call it Jumpy... >> >> Since I'm not a python/jython/numpy/scipy user I think someone else should take the lead here. >> >> Don't talk too much - just do it. Start with the most simple case. >> >> I'm definitely interested in ways to make ojAlgo more useful. >> >> /Anders >> >> >> On 19 apr 2012, at 15:39, Stefan Richthofer wrote: >> >>> Hello together, >>> I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. >>> >>> Be aware of the high Potential of the idea. >>> >>> Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). >>> >>> Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. >>> >>> I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. >>> >>> Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? >>> It should be highly in their interest to have a numpy implementation for java. >>> >>> >>> Greetings >>> >>> Stefan >>> >>> >>> >>> -------- Original-Nachricht -------- >>>> Datum: Thu, 19 Apr 2012 13:56:49 +0200 >>>> Von: Anders Peterson <an...@op...> >>>> An: oja...@li... >>>> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? >>> >>>> Short anser is yes, but you have to be more specific regarding what you >>>> want/need and willing to do some of the work yourself. >>>> >>>> ojAlgo has multi/any-dimensional arrays: >>>> >>>> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html >>>> >>>> Frankly I don't really know what to do with them. I tend to only use 1- or >>>> 2-dimensional data structures. I created them because they were a >>>> generalization of what I needed that *could* become useful. >>>> >>>> I guess the various MatrixStore implementations and the >>>> MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong >>>> syntax). >>>> >>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html >>>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html >>>> >>>> In ojAlgo the description of the array shape/structure is fixed as defined >>>> in AccessUtils >>>> >>>> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html >>>> >>>> Would that need to be changed? (I hope not.) >>>> >>>> /Anders >>>> >>>> >>>> On 19 apr 2012, at 11:35, B.D. wrote: >>>> >>>>> Dear developers, >>>>> >>>>> I'm primarily interested in Machine Learning and Data analysis. Thanks >>>> for the >>>>> good work, I appreciate the ojAlgo library very much! However, most new >>>>> algorithms and applications in this field are still written in Python >>>> for >>>>> Numpy/Scipy, not Java. I just had an idea: >>>>> >>>>> If one could offer classes/interfaces in pure Java with similar >>>> functionality >>>>> and names as in >>>>> >>>>> http://docs.scipy.org/doc/numpy/reference/ , >>>>> >>>>> in particular ndarray >>>>> >>>>> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html >>>>> >>>>> (e.g. strides in matrices and vectors, transposition, reshaping of >>>> matrices as >>>>> a view without copying, many views on the same matrix data), then one >>>> could >>>>> rather easily translate Python programs using Numpy to pure Java without >>>>> reinventing the wheel and offer the excellent Python software for Java >>>> under >>>>> the same license as the original. >>>>> >>>>> There are syntax limitations in Java, so >>>>> >>>>> A[2:5, :] >>>>> >>>>> would have to be translated to some intutive name or even a crazy >>>> mnemonic like >>>>> >>>>> A.viewI_c_icI(2, 5) >>>>> >>>>> (I = [ or ], >>>>> i = comma, >>>>> c = colon, >>>>> _ = slots for the arguments). >>>>> >>>>> What do you think? >>>>> >>>>> Best regards >>>>> B.D. >>>>> >>>>> >>>> ------------------------------------------------------------------------------ >>>>> For Developers, A Lot Can Happen In A Second. >>>>> Boundary is the first to Know...and Tell You. >>>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>>> _______________________________________________ >>>>> ojAlgo-user mailing list >>>>> ojA...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>>> >>>> ------------------------------------------------------------------------------ >>>> For Developers, A Lot Can Happen In A Second. >>>> Boundary is the first to Know...and Tell You. >>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>> _______________________________________________ >>>> ojAlgo-user mailing list >>>> ojA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> -- >>> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! >>> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a >>> >>> ------------------------------------------------------------------------------ >>> For Developers, A Lot Can Happen In A Second. >>> Boundary is the first to Know...and Tell You. >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> http://p.sf.net/sfu/Boundary-d2dvs2 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >> >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: B.D. <ab...@ma...> - 2012-04-19 20:22:08
|
Dear Mr. Peterson, > Don't talk too much - just do it. Start with the most simple case. yes, you're right. I think this is a nice collection of simple unit tests for me: http://www.scipy.org/Numpy_Example_List See you later, B.D. Anders Peterson wrote: > Let's call it Jumpy... > > Since I'm not a python/jython/numpy/scipy user I think someone else should take the lead here. > > Don't talk too much - just do it. Start with the most simple case. > > I'm definitely interested in ways to make ojAlgo more useful. > > /Anders > > > On 19 apr 2012, at 15:39, Stefan Richthofer wrote: > >> Hello together, >> I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. >> >> Be aware of the high Potential of the idea. >> >> Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). >> >> Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. >> >> I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. >> >> Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? >> It should be highly in their interest to have a numpy implementation for java. >> >> >> Greetings >> >> Stefan >> >> >> >> -------- Original-Nachricht -------- >>> Datum: Thu, 19 Apr 2012 13:56:49 +0200 >>> Von: Anders Peterson <an...@op...> >>> An: oja...@li... >>> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? >> >>> Short anser is yes, but you have to be more specific regarding what you >>> want/need and willing to do some of the work yourself. >>> >>> ojAlgo has multi/any-dimensional arrays: >>> >>> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html >>> >>> Frankly I don't really know what to do with them. I tend to only use 1- or >>> 2-dimensional data structures. I created them because they were a >>> generalization of what I needed that *could* become useful. >>> >>> I guess the various MatrixStore implementations and the >>> MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong >>> syntax). >>> >>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html >>> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html >>> >>> In ojAlgo the description of the array shape/structure is fixed as defined >>> in AccessUtils >>> >>> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html >>> >>> Would that need to be changed? (I hope not.) >>> >>> /Anders >>> >>> >>> On 19 apr 2012, at 11:35, B.D. wrote: >>> >>>> Dear developers, >>>> >>>> I'm primarily interested in Machine Learning and Data analysis. Thanks >>> for the >>>> good work, I appreciate the ojAlgo library very much! However, most new >>>> algorithms and applications in this field are still written in Python >>> for >>>> Numpy/Scipy, not Java. I just had an idea: >>>> >>>> If one could offer classes/interfaces in pure Java with similar >>> functionality >>>> and names as in >>>> >>>> http://docs.scipy.org/doc/numpy/reference/ , >>>> >>>> in particular ndarray >>>> >>>> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html >>>> >>>> (e.g. strides in matrices and vectors, transposition, reshaping of >>> matrices as >>>> a view without copying, many views on the same matrix data), then one >>> could >>>> rather easily translate Python programs using Numpy to pure Java without >>>> reinventing the wheel and offer the excellent Python software for Java >>> under >>>> the same license as the original. >>>> >>>> There are syntax limitations in Java, so >>>> >>>> A[2:5, :] >>>> >>>> would have to be translated to some intutive name or even a crazy >>> mnemonic like >>>> >>>> A.viewI_c_icI(2, 5) >>>> >>>> (I = [ or ], >>>> i = comma, >>>> c = colon, >>>> _ = slots for the arguments). >>>> >>>> What do you think? >>>> >>>> Best regards >>>> B.D. >>>> >>>> >>> ------------------------------------------------------------------------------ >>>> For Developers, A Lot Can Happen In A Second. >>>> Boundary is the first to Know...and Tell You. >>>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>>> http://p.sf.net/sfu/Boundary-d2dvs2 >>>> _______________________________________________ >>>> ojAlgo-user mailing list >>>> ojA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> ------------------------------------------------------------------------------ >>> For Developers, A Lot Can Happen In A Second. >>> Boundary is the first to Know...and Tell You. >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> http://p.sf.net/sfu/Boundary-d2dvs2 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> -- >> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! >> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: B.D. <ab...@ma...> - 2012-04-19 20:10:19
|
Dear Mr. Richthofer, thanks for your kind email. I also think that it's worthwhile to try to make Ojalgo look like Numpy to jython with full compatibility. We would just have to offer a Java package with the right names and functionality to accomplish this. Maybe some parts are yet missing in Ojalgo. Let's see how it works out. I'll contact the jython guys as soons as I have something to show. It would be very nice to have the same interface on the Java side as well. Sadly, this is not the case with Numpy and C/C++: You can't call Numpy easily from these languages even though Numpy is written in C. Best regards, B.D. Stefan Richthofer wrote: > Hello together, > I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. > > Be aware of the high Potential of the idea. > > Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). > > Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. > > I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. > > Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? > It should be highly in their interest to have a numpy implementation for java. > > > Greetings > > Stefan > > > > -------- Original-Nachricht -------- >> Datum: Thu, 19 Apr 2012 13:56:49 +0200 >> Von: Anders Peterson <an...@op...> >> An: oja...@li... >> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? > >> Short anser is yes, but you have to be more specific regarding what you >> want/need and willing to do some of the work yourself. >> >> ojAlgo has multi/any-dimensional arrays: >> >> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html >> >> Frankly I don't really know what to do with them. I tend to only use 1- or >> 2-dimensional data structures. I created them because they were a >> generalization of what I needed that *could* become useful. >> >> I guess the various MatrixStore implementations and the >> MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong >> syntax). >> >> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html >> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html >> >> In ojAlgo the description of the array shape/structure is fixed as defined >> in AccessUtils >> >> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html >> >> Would that need to be changed? (I hope not.) >> >> /Anders >> >> >> On 19 apr 2012, at 11:35, B.D. wrote: >> > >> Dear developers, > >> > >> I'm primarily interested in Machine Learning and Data analysis. Thanks >> for the > >> good work, I appreciate the ojAlgo library very much! However, most new > >> algorithms and applications in this field are still written in Python >> for > >> Numpy/Scipy, not Java. I just had an idea: > >> > >> If one could offer classes/interfaces in pure Java with similar >> functionality > >> and names as in > >> > >> http://docs.scipy.org/doc/numpy/reference/ , > >> > >> in particular ndarray > >> > >> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html > >> > >> (e.g. strides in matrices and vectors, transposition, reshaping of >> matrices as > >> a view without copying, many views on the same matrix data), then one >> could > >> rather easily translate Python programs using Numpy to pure Java without > >> reinventing the wheel and offer the excellent Python software for Java >> under > >> the same license as the original. > >> > >> There are syntax limitations in Java, so > >> > >> A[2:5, :] > >> > >> would have to be translated to some intutive name or even a crazy >> mnemonic like > >> > >> A.viewI_c_icI(2, 5) > >> > >> (I = [ or ], > >> i = comma, > >> c = colon, > >> _ = slots for the arguments). > >> > >> What do you think? > >> > >> Best regards > >> B.D. > >> > >> >> ------------------------------------------------------------------------------ > >> For Developers, A Lot Can Happen In A Second. > >> Boundary is the first to Know...and Tell You. > >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >> http://p.sf.net/sfu/Boundary-d2dvs2 > >> _______________________________________________ > >> ojAlgo-user mailing list > >> ojA...@li... > >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > -- > NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! > Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2012-04-19 20:07:44
|
Let's call it Jumpy... Since I'm not a python/jython/numpy/scipy user I think someone else should take the lead here. Don't talk too much - just do it. Start with the most simple case. I'm definitely interested in ways to make ojAlgo more useful. /Anders On 19 apr 2012, at 15:39, Stefan Richthofer wrote: > Hello together, > I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. > > Be aware of the high Potential of the idea. > > Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). > > Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. > > I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. > > Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? > It should be highly in their interest to have a numpy implementation for java. > > > Greetings > > Stefan > > > > -------- Original-Nachricht -------- >> Datum: Thu, 19 Apr 2012 13:56:49 +0200 >> Von: Anders Peterson <an...@op...> >> An: oja...@li... >> Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? > >> Short anser is yes, but you have to be more specific regarding what you >> want/need and willing to do some of the work yourself. >> >> ojAlgo has multi/any-dimensional arrays: >> >> http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html >> >> Frankly I don't really know what to do with them. I tend to only use 1- or >> 2-dimensional data structures. I created them because they were a >> generalization of what I needed that *could* become useful. >> >> I guess the various MatrixStore implementations and the >> MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong >> syntax). >> >> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html >> http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html >> >> In ojAlgo the description of the array shape/structure is fixed as defined >> in AccessUtils >> >> http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html >> >> Would that need to be changed? (I hope not.) >> >> /Anders >> >> >> On 19 apr 2012, at 11:35, B.D. wrote: >> >>> Dear developers, >>> >>> I'm primarily interested in Machine Learning and Data analysis. Thanks >> for the >>> good work, I appreciate the ojAlgo library very much! However, most new >>> algorithms and applications in this field are still written in Python >> for >>> Numpy/Scipy, not Java. I just had an idea: >>> >>> If one could offer classes/interfaces in pure Java with similar >> functionality >>> and names as in >>> >>> http://docs.scipy.org/doc/numpy/reference/ , >>> >>> in particular ndarray >>> >>> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html >>> >>> (e.g. strides in matrices and vectors, transposition, reshaping of >> matrices as >>> a view without copying, many views on the same matrix data), then one >> could >>> rather easily translate Python programs using Numpy to pure Java without >>> reinventing the wheel and offer the excellent Python software for Java >> under >>> the same license as the original. >>> >>> There are syntax limitations in Java, so >>> >>> A[2:5, :] >>> >>> would have to be translated to some intutive name or even a crazy >> mnemonic like >>> >>> A.viewI_c_icI(2, 5) >>> >>> (I = [ or ], >>> i = comma, >>> c = colon, >>> _ = slots for the arguments). >>> >>> What do you think? >>> >>> Best regards >>> B.D. >>> >>> >> ------------------------------------------------------------------------------ >>> For Developers, A Lot Can Happen In A Second. >>> Boundary is the first to Know...and Tell You. >>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >>> http://p.sf.net/sfu/Boundary-d2dvs2 >>> _______________________________________________ >>> ojAlgo-user mailing list >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > -- > NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! > Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |
From: B.D. <ab...@ma...> - 2012-04-19 16:46:23
|
Dear Mr. Peterson, thank you for your fast answer. It would be very nice to have a cross-language standard for machine-learning and data-analysis libraries, and Numpy/Scipy is the most widely used. So I'll try to write a thin Adapter layer for ojAlgo to make it look like that. The foundations are there, thanks a lot! Best regards, B.D. Anders Peterson wrote: > Short anser is yes, but you have to be more specific regarding what you want/need and willing to do some of the work yourself. > > ojAlgo has multi/any-dimensional arrays: > > http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html > > Frankly I don't really know what to do with them. I tend to only use 1- or 2-dimensional data structures. I created them because they were a generalization of what I needed that *could* become useful. > > I guess the various MatrixStore implementations and the MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong syntax). > > http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html > http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html > > In ojAlgo the description of the array shape/structure is fixed as defined in AccessUtils > > http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html > > Would that need to be changed? (I hope not.) > > /Anders > > > On 19 apr 2012, at 11:35, B.D. wrote: > >> Dear developers, >> >> I'm primarily interested in Machine Learning and Data analysis. Thanks for the >> good work, I appreciate the ojAlgo library very much! However, most new >> algorithms and applications in this field are still written in Python for >> Numpy/Scipy, not Java. I just had an idea: >> >> If one could offer classes/interfaces in pure Java with similar functionality >> and names as in >> >> http://docs.scipy.org/doc/numpy/reference/ , >> >> in particular ndarray >> >> http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html >> >> (e.g. strides in matrices and vectors, transposition, reshaping of matrices as >> a view without copying, many views on the same matrix data), then one could >> rather easily translate Python programs using Numpy to pure Java without >> reinventing the wheel and offer the excellent Python software for Java under >> the same license as the original. >> >> There are syntax limitations in Java, so >> >> A[2:5, :] >> >> would have to be translated to some intutive name or even a crazy mnemonic like >> >> A.viewI_c_icI(2, 5) >> >> (I = [ or ], >> i = comma, >> c = colon, >> _ = slots for the arguments). >> >> What do you think? >> >> Best regards >> B.D. >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Stefan R. <Ste...@gm...> - 2012-04-19 13:39:51
|
Hello together, I also often thought about the idea to have a numpy-substitute for java, but always feared the enormous effort related to it. Be aware of the high Potential of the idea. Having a numpy substitute in java would enable a huge amount of scientific python-code to run directly in java via jython (maybe with a slight modification of the imports). Jython's main issue keeping it from being very useful is, that it does not support external (native) libraries written for Python. I regard numpy as one of the most important of these and I believe, that a significant amount of scientific python-code has numpy as the only non-python-core-dependency and thus could run via jython, if there was a numpy for java. Maybe you could consider a cooperation with the jython-developers at http://www.jython.org ...? It should be highly in their interest to have a numpy implementation for java. Greetings Stefan -------- Original-Nachricht -------- > Datum: Thu, 19 Apr 2012 13:56:49 +0200 > Von: Anders Peterson <an...@op...> > An: oja...@li... > Betreff: Re: [ojAlgo-user] Interface analogous to Numpy? > Short anser is yes, but you have to be more specific regarding what you > want/need and willing to do some of the work yourself. > > ojAlgo has multi/any-dimensional arrays: > > http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html > > Frankly I don't really know what to do with them. I tend to only use 1- or > 2-dimensional data structures. I created them because they were a > generalization of what I needed that *could* become useful. > > I guess the various MatrixStore implementations and the > MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong > syntax). > > http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html > http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html > > In ojAlgo the description of the array shape/structure is fixed as defined > in AccessUtils > > http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html > > Would that need to be changed? (I hope not.) > > /Anders > > > On 19 apr 2012, at 11:35, B.D. wrote: > > > Dear developers, > > > > I'm primarily interested in Machine Learning and Data analysis. Thanks > for the > > good work, I appreciate the ojAlgo library very much! However, most new > > algorithms and applications in this field are still written in Python > for > > Numpy/Scipy, not Java. I just had an idea: > > > > If one could offer classes/interfaces in pure Java with similar > functionality > > and names as in > > > > http://docs.scipy.org/doc/numpy/reference/ , > > > > in particular ndarray > > > > http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html > > > > (e.g. strides in matrices and vectors, transposition, reshaping of > matrices as > > a view without copying, many views on the same matrix data), then one > could > > rather easily translate Python programs using Numpy to pure Java without > > reinventing the wheel and offer the excellent Python software for Java > under > > the same license as the original. > > > > There are syntax limitations in Java, so > > > > A[2:5, :] > > > > would have to be translated to some intutive name or even a crazy > mnemonic like > > > > A.viewI_c_icI(2, 5) > > > > (I = [ or ], > > i = comma, > > c = colon, > > _ = slots for the arguments). > > > > What do you think? > > > > Best regards > > B.D. > > > > > ------------------------------------------------------------------------------ > > For Developers, A Lot Can Happen In A Second. > > Boundary is the first to Know...and Tell You. > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a |
From: Anders P. <an...@op...> - 2012-04-19 11:57:05
|
Short anser is yes, but you have to be more specific regarding what you want/need and willing to do some of the work yourself. ojAlgo has multi/any-dimensional arrays: http://ojalgo.org/generated/org/ojalgo/array/ArrayAnyD.html Frankly I don't really know what to do with them. I tend to only use 1- or 2-dimensional data structures. I created them because they were a generalization of what I needed that *could* become useful. I guess the various MatrixStore implementations and the MatrixStore.Builder does much of what you want, but only for 2-dim arrays (and with wrong syntax). http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.html http://ojalgo.org/generated/org/ojalgo/matrix/store/MatrixStore.Builder.html In ojAlgo the description of the array shape/structure is fixed as defined in AccessUtils http://ojalgo.org/generated/org/ojalgo/access/AccessUtils.html Would that need to be changed? (I hope not.) /Anders On 19 apr 2012, at 11:35, B.D. wrote: > Dear developers, > > I'm primarily interested in Machine Learning and Data analysis. Thanks for the > good work, I appreciate the ojAlgo library very much! However, most new > algorithms and applications in this field are still written in Python for > Numpy/Scipy, not Java. I just had an idea: > > If one could offer classes/interfaces in pure Java with similar functionality > and names as in > > http://docs.scipy.org/doc/numpy/reference/ , > > in particular ndarray > > http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html > > (e.g. strides in matrices and vectors, transposition, reshaping of matrices as > a view without copying, many views on the same matrix data), then one could > rather easily translate Python programs using Numpy to pure Java without > reinventing the wheel and offer the excellent Python software for Java under > the same license as the original. > > There are syntax limitations in Java, so > > A[2:5, :] > > would have to be translated to some intutive name or even a crazy mnemonic like > > A.viewI_c_icI(2, 5) > > (I = [ or ], > i = comma, > c = colon, > _ = slots for the arguments). > > What do you think? > > Best regards > B.D. > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: B.D. <ab...@ma...> - 2012-04-19 09:35:53
|
Dear developers, I'm primarily interested in Machine Learning and Data analysis. Thanks for the good work, I appreciate the ojAlgo library very much! However, most new algorithms and applications in this field are still written in Python for Numpy/Scipy, not Java. I just had an idea: If one could offer classes/interfaces in pure Java with similar functionality and names as in http://docs.scipy.org/doc/numpy/reference/ , in particular ndarray http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html (e.g. strides in matrices and vectors, transposition, reshaping of matrices as a view without copying, many views on the same matrix data), then one could rather easily translate Python programs using Numpy to pure Java without reinventing the wheel and offer the excellent Python software for Java under the same license as the original. There are syntax limitations in Java, so A[2:5, :] would have to be translated to some intutive name or even a crazy mnemonic like A.viewI_c_icI(2, 5) (I = [ or ], i = comma, c = colon, _ = slots for the arguments). What do you think? Best regards B.D. |
From: Anders P. <an...@op...> - 2012-04-16 08:52:52
|
Released v32 Today it is 9 years since ojAlgo was registered at SourceForge, and according to ohloh the ojAlgo code base represents an estimated effort of 14 person-years. http://ojalgo.org/change_log.html http://sourceforge.net/projects/ojalgo/files/ojAlgo/ /Anders |
From: Anders P. <an...@op...> - 2012-04-15 18:48:50
|
http://ojalgo.org/performance_ejml.html The Java Matrix Benchmark is by far the best java linear algebra package comparison I've seen. It is developed by the author of EJML (another java linear algebra package). Given the fact that this is someone else's benchmark I think ojAlgo does ok. /Anders |
From: Anders P. <an...@op...> - 2012-04-12 13:13:30
|
What info about the matrices are you looking for? The QuadraticSolver javadoc states: "You construct instances by using the QuadraticSolver.Builder class. It will return an appropriate subclass for you. It's recommended that you first create a QuadraticExpressionsModel and feed that to the QuadraticSolver.Builder." http://ojalgo.org/generated/org/ojalgo/optimisation/quadratic/QuadraticSolver.html With the latest changes I've made you should no longer use QuadraticExpressionsModel. Instead you should use its parent class ExpressionsBasedModel. Models also have a getDefaultSolver() method that will call the appropriate/default Builder for you. The list archives are searchable... http://sourceforge.net/search/index.php?group_id=79000&type_of_search=mlists&q=quadratic&ml_name%5B%5D=ojalgo-user&posted_date_start=&posted_date_end=&form_submit=Search /Anders On 12 apr 2012, at 14:53, Amandeep Gautam wrote: > Hi, > I want to use ojalgo library for Quadratic programming but have the following problem: The frmulation of the quadratic program is given as > > min 1/2 [X]T[Q][X] - [C]T[X] > when [AE][X] == [BE] > and [AI][X] <= [BI] > > but no information about [BI], [BE], [AI], [AE] and [Q] has been given. Also are no constructors through which you can input the value of these parameters. > > Looking forward for a positive response. > > Regards, > Aman Deep Gautam > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Amandeep G. <ama...@gm...> - 2012-04-12 12:53:25
|
Hi, I want to use ojalgo library for Quadratic programming but have the following problem: The frmulation of the quadratic program is given as min 1/2 [X]T[Q][X] - [C]T[X] when [AE][X] == [BE] and [AI][X] <= [BI] but no information about [BI], [BE], [AI], [AE] and [Q] has been given. Also are no constructors through which you can input the value of these parameters. Looking forward for a positive response. Regards, Aman Deep Gautam |
From: Anders P. <an...@op...> - 2012-03-30 08:27:41
|
v31.12 is now available. /Anders On 28 mar 2012, at 22:19, Anders Peterson wrote: > A few days ago I released snapshot v31.11 and there will probably be another snapshot release soon. Lately there's been major refactoring to the org.ojalgo.optimisation packages. If you are coding directly against these packages and you plan to upgrade to v32 you should get these snapshot releases to see what you need to change in your code. If you feel I've made changes that make life too difficult for you, now is the time to let me know. There is a much greater chance I listen to you now than after the release of v32. > > The full change log for the upcoming v32 can be seen here: http://ojalgo.org/change_log.html |
From: Anders P. <an...@op...> - 2012-03-29 20:47:38
|
Things would be easier for you if you followed the advice given on the change log page: "If you're lagging behind and need to update over several versions it is recommended that you upgrade incrementally to each intermediate version (and finally to the latest snapshot)". Deprecated stuff is usually removed as soon as a new version has been released. Since you've skipped v31 and gone straight to a recent snapshot you don't see the javadoc deprecation messages. You can see them here: http://ojalgo.cvs.sourceforge.net/viewvc/ojalgo/DevProj/src/org/ojalgo/random/process/GeometricBrownianMotion.java?revision=1.15&view=markup&pathrev=Version31 /Anders On 29 mar 2012, at 16:14, <kri...@se...> <kri...@se...> wrote: > Hi, > > According to the change log the following methods are deprecated as of v.31.* > > ◦Deprecated getLowerConfidenceBound and getUpperConfidenceBound in GeometricBrownianMotion - they're incorrect, and have an unfortunate api > > What should be used instead? > > /Kristian > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: <kri...@se...> - 2012-03-29 14:14:21
|
Hi, According to the change log the following methods are deprecated as of v.31.* ◦Deprecated getLowerConfidenceBound and getUpperConfidenceBound in GeometricBrownianMotion - they're incorrect, and have an unfortunate api What should be used instead? /Kristian |
From: Anders P. <an...@op...> - 2012-03-28 20:19:39
|
A few days ago I released snapshot v31.11 and there will probably be another snapshot release soon. Lately there's been major refactoring to the org.ojalgo.optimisation packages. If you are coding directly against these packages and you plan to upgrade to v32 you should get these snapshot releases to see what you need to change in your code. If you feel I've made changes that make life too difficult for you, now is the time to let me know. There is a much greater chance I listen to you now than after the release of v32. The full change log for the upcoming v32 can be seen here: http://ojalgo.org/change_log.html |
From: Anders P. <an...@op...> - 2012-03-28 12:11:51
|
Versions 29, 30 and 31 as well as a recent snapshot are all available to download with source code. All versions ever released have a corresponding tag/version in CVS. The tags are named Version1, Version2, Version3... Version31 And/or you can browse the source repository (all versions) at: http://ojalgo.cvs.sourceforge.net/ojalgo/ CalendarDateUnit.round(...) does roughly the same thing as TimeFilter.filter(...) did, except that it mutates the original/input Calendar or Date. /Anders On 28 mar 2012, at 11:25, <kri...@se...> wrote: > Hi, > > I'm upgrading our old ojAlgo (v.29 something I think) to the latest released version, and have run into a problem. Our application uses the now removed class TimeFilter. According to the change log it has been replaced with the class CalendarDateUnit. In TimeFilter there was a method called filter with either Date or Calendar as input parameter. I haven't been able to figure out how to replace this method. Is there some equivalent method in CalendarDateUnit? Maybe the method round? I can't compare because I don't have the source code to the old filter method. > > Best regards > Kristian > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |