Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
424 Discussions

Getting error when importing dpnp.dparray with dpnp 0.10.1 or 0.10.2 on Windows 10

DManowitz
Novice
1,388 Views

When I try to import dpnp.dparray with dpnp v0.10.1 (using either Python 3.7 or 3.8) or v0.10.2 (using Python 3.8, since no version available for Python 3.7) on Windows 10, I get the following error:

 

File "dpnp\dparray.pyx", line 40, in init dpnp.dparray
TypeError: Cannot overwrite C type array

 

I did not get this error when importing dpnp.dparray in dpnp v0.10.0 (using either Python 3.7 or 3.8)

 

Can someone investigate this?

0 Kudos
9 Replies
Rahila_T_Intel
Moderator
1,346 Views

Hi,

 

Thanks for posting in Intel communities.

 

We are unable to reproduce the issue from our end.

 

is it the below command you used to install dpdnp as mentioned in https://intelpython.github.io/dpnp/install.html#installing-dpnp-from-source 

conda install -c intel dpnp

Could you please provide the command you used to install dpnp version 0.10.1 and 0.10.2. 

 

 

Thanks

 

0 Kudos
DManowitz
Novice
1,330 Views

The simplest way I was able to reproduce this error was to first set my .condarc to the following:

channels:
- intel
- defaults

I then created new conda environments (one with Python 3.7 and one with Python 3.8), which installed the Intel Python versions, and executed

conda install intelpython3_full

This installed dpnp v0.10.1 as part of its dependencies.

 

I was also able to reproduce the problem after creating Python 3.7 and 3.8 environments using the following .condarc file:

channel_priority: disabled
channels:
  - pytorch
  - conda-forge
  - intel
  - defaults

This interestingly installed the Intel Python version for Python 3.7, but the conda-forge Python version for 3.8.  In either case, I then installed several of the Intel python packages into these environments and was also able to reproduce the problem using dpnp v0.10.1.

 

At this point, I noticed that dpnp v0.10.2 was available for Python 3.8, so I wondered if that would fix the problem.  I was able to install it into my conda-forge environment, but I was not able to install it into my initial Python 3.8 environment, as the intelpython3_full package constrained dpnp to be v0.10.1.

 

I was then able to reproduce the problem again in my conda-forge environment with dpnp v.0.10.2.

0 Kudos
Rahila_T_Intel
Moderator
1,291 Views

Hi,


We are able to reproduce the issue from our end.


We are checking on this internally and will share you the updates.


Thanks


0 Kudos
Rahila_T_Intel
Moderator
1,188 Views

Hi,

 

Could you please provide the details regarding the requirement of dpnp.dparray in your code. Because dpnp.dparray is depreciated and it should not be used. You can use dpnp methods directly. 

Also please try to remove import dpnp.dparray and confirm whether it is still running fine. If not, please provide the dparray usage, We can provide the alternative dpnp method.

 

Thanks

 

0 Kudos
DManowitz
Novice
1,172 Views

I did not realize that dpnp.dparray is deprecated.  I will stop using it then.

0 Kudos
DManowitz
Novice
1,172 Views

Although, admittedly, you should issue a warning about the package being deprecated, not an error.

0 Kudos
Rahila_T_Intel
Moderator
1,148 Views

Hi,


Thank you for your feedback. We have provided your feedback to the relevant team.


Please let me know if we can go ahead and close this case?


Thanks


0 Kudos
DManowitz
Novice
1,127 Views

Yes, you can go ahead and close this case.

0 Kudos
Rahila_T_Intel
Moderator
1,105 Views

Hi,


Thanks for sharing the confirmation.

Glad to know that your query is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks


0 Kudos
Reply