Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Denis Lisov
    @tanriol
    @BarryLiu-97 Sounds like some variant of np.diff
    刘政(Barry Liu)
    @BarryLiu97
    Yes, but I didn't find a way to implement that with np.diff.
    So if there is none, I may implement one but only useful to my own data. @tanriol
    matrixbot
    @matrixbot
    jjrbfi Hi does anyone know how to take one pixel from every 8x8 pixel from a image doing a for loop?

    jjrbfi I used image_int[::8]

    That works but I have to do it in a for loop

    Matt Thompson
    @mattwthompson
    Is there a rough timeline for 1.20 release? I can't find anything documented on this
    alm
    @alonme

    Hey,
    wanted to ask here before opening an issue.

    Is there a numpy function to get the Pooled Standard Deviation?
    as shown here
    https://www.statisticshowto.com/pooled-standard-deviation/

    Rubi
    @codenoid

    Hi friend, I'm trying to fit postgresql max CUBE by reducing numpy nd array, but the results are not as expected

    the code for reducing dimension :

    pca = PCA(1)
    feature = feature.reshape(-1, 1)
    feature = pca.fit_transform(feature)

    i think the code still wrong and do not reduce the "feature" dimension

    Denis Lisov
    @tanriol
    @codenoid What are you trying to do with the reshape?
    Rubi
    @codenoid
    Screenshot from 2020-11-29 05-30-28.png
    have no idea, i just follow what console says ._. (it's error without the .reshape)
    Denis Lisov
    @tanriol
    What does the feature array contain?
    4 replies
    oponkork
    @oponkork

    Hi all,

    How do I ask numpy to use longdouble precision everywhere?

    Denis Lisov
    @tanriol
    I think there's no switch for "everywhere", you need to do that manually and carefully.
    oponkork
    @oponkork
    Guess so. Also found this issue: numpy/numpy#6860
    Denis Lisov
    @tanriol
    Also note that it's likely to be significantly slower because, AFAIK, the vectorized instruction sets do not support it.
    oponkork
    @oponkork
    I just need it for testing purposes.
    Thanks for the heads up btw.
    Vishesh Mangla
    @XtremeGood
    I used
    np.set_printoptions(suppress=False)
    yet I 'm getting
    .93/np.exp(-20*10**3/(1.98*373))
    as 536260207538.76215
    Reading these big numbers like this is too difficult and if there are zeroes then its impossible to read it without mistake, especially when number has 0's to the right of the decimal . I want to see the number in scientific notations. How to do it? I ' m using jupyter notebook.
    All answers on googling are to suppress scientific notation, and setting suppress=False/True, none worked
    Thomas Aarholt
    @thomasaarholt
    I agree that it isn't obvious! One approach, if you're not using wanting to see several entries in an array at once, is to print it with python's formatting:
    >>> number = .93/np.exp(-20*10**3/(1.98*373))
    >>> print("{:.2E}".format(number))
    5.36E+11
    Thomas Robitaille
    @astrofrog
    Hi all, I'm working on a C extension for a Python package in which I'd like to find the median of a Numpy array, and was curious why PyArray_Median does not exist?
    Matti Picus
    @mattip
    median is a implemented as a python function
    Thomas Robitaille
    @astrofrog
    ah of course thanks :)
    spencer0523
    @spencer0523
    I am having issues installing numpy on the new mac with m1 chip. I keep getting this "ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly" even after upgrading pip. Running the command "pip3 install numpy --user" to install
    Dominik Stańczak
    @StanczakDominik:matrix.org
    [m]
    Hey everyone! Quick question - am I right in thinking that there is no practical difference between some_numpy_array[:] = some_iterable andsome_numpy_array[...] = some_iterable, for a 1D array?
    Thomas Aarholt
    @thomasaarholt
    That is correct
    [...] refers to "all axes" while [:] means the first axis, which is the same in this case :)
    geophysics91
    @geophysics91
    Hii experts, i want to save a large matrix in using scipy.io.savemat function but it is unable to save instead it gives error : Matrix too large to save with Matlab 5 format, however i searched over internet and tried to overcome the problem by using do_compression=True. still it gives same error.can anybody suggest me a better solution to save a large matrix in .mat format using python.
    Thomas Aarholt
    @thomasaarholt
    Try setting format to version 4?
    Thomas Aarholt
    @thomasaarholt
    How can I call np.min(arr, axis=something) to always operate on the last two axes of arr?
    I'm trying to write a function that can normalise a single image, as well as a list of images.
    Oh hang on. I can just do axis=(-2, -1). :facepalm:
    Buğra
    @BgR8
    hey, when i run import numpy as np for python3 in ubuntu terminal it shows illegal instruction (core dumped)
    Thomas Aarholt
    @thomasaarholt
    @BgR8 is there anything unusual about your setup? How did you install numpy and python?
    Buğra
    @BgR8
    @thomasaarholt numpy and python installed with nvidia jetpack sdk
    Thomas Aarholt
    @thomasaarholt
    Can't say I'm familiar with nvidia's jetpack
    Is this you? numpy/numpy#18131
    Or someone else?
    Buğra
    @BgR8
    yes
    Thomas Aarholt
    @thomasaarholt
    If I were you, I would add your problem, with the same about of info as the first post in that thread.
    You mean someone else?
    Buğra
    @BgR8
    ok, thank you but same problem happen when run import torch
    Thomas Aarholt
    @thomasaarholt
    Without more info, I would just guess that torch imports numpy, and that's why you get the error
    Is there a specific reason why you are using the jetpack version?
    If you just want to get a working environment, I would just download anaconda or miniconda.
    Buğra
    @BgR8
    i'm using nvidia jetson tx2 and problem happened on jetson
    Thomas Aarholt
    @thomasaarholt
    Hehe, I'd say that that qualifies as "something unusual about your setup" that you should mention at the start ;)
    I'll start a thread here so we don't pollute the chat too much, please comment on the thread in this comment
    23 replies