Some problems importing *.hdf5 files in MA12.2

I’m attempting to Import datasets from a *.hdf5 file into Mathematica 12.2 in Win 7.

After looking at the syntax in the Wolfram Documentation Center and displaying the StructureGraph, I had no problem importing some of the datasets, from various levels, using Import["file.hdf5",elem]

However, the one dataset I’m really interested with, just gives me $ Failed, with no additional explanations. Suggestions?

I can look at the data in this dataset using an app called HDFView. It looks fine, a spreadsheet similar to those in the datasets that were imported.

using Import[file, {{"Dimensions", "DataFormat"}}], I do notice one thing that is perhaps a problem? The format of one column is "bitfield". Using HDFView, this column includes values of either 01 or 00. Is this the problem and can it be solved?

Two of the other datasets in this files I also can’t import, but at least I get a warning message:

LibraryFunction::fpexc: Numeric data containing a floating point exception (NaN or Inf) encountered.

When looking at these datasets with HDFView, they indeed contain some NaN values. Is there a way to import them?

Can i use a string as an end of line delimeter when importing a csv to mysql?

Very basic question but im struggling with it. When i am importing a csv file to mysql is it possible to use any character or string as an end of line delimeter? If so is it possible from the admin window ‘Import’? Or must i do so in a sql query (doesnt seem logical).

So far i have had issues using everything besides \n and auto in the php my admin window. I tried the € sign i tried ///. Didnt work and got errors relating to an incorrect end of line delimeter.
Any help would be much appreciated. Thank you.

A glitch with importing a list of lists of polynomials

Would anybody know how to import a list of lists of polynomials which I exported earlier?

d = {{3*t^2 + 2*t^(-1), 5*t + 6*t^(-2) + 7*t^(-4)}, {7*t^2 + 8*t^(-1), 9*t + 10*t^(-2)}}  Export["mydata.dat",d]  Import["mydata.dat"]  Out[]={{"2/t", "+", "3*t^2", "7/t^4", "+", "6/t^2", "+", "5*t"}, {"8/t", "+", "7*t^2", "10/t^2", "+", "9*t"}}  imp=Import["mydata.dat", "List"] Out[]={2/t + 3*t^2  7/t^4 + 6/t^2 + 5*t, 8/t + 7*t^2    10/t^2 + 9*t} imp[[1]] Out[]= 2/t + 3*t^2  7/t^4 + 6/t^2 + 5*t imp[[1]][[1]]  error: Part::partd: Part specification 2/t + 3*t^2  7/t^4 + 6/t^2 + 5*t[[1]] is longer than depth of object. Head @ imp[[1]] Out[]=String 

Exporting as "List" does not help.

pg_restore importing single table to a file

I have a backup in directory format taken with pg_dump.

When I try to export single table from this dump with the command:

pg_restore -Fd mydirectory -t sometable > table.sql  

I get the error :

pg_restore: error: one of -d/--dbname and -f/--file must be specified. 

When I read the document if no -d parameter passed pg_restore should print the output to stdout.

What I am missing?

Importing NewStore’s demo data failed on Awardspace free web hosting

I have tried to import the NewStore Them demo site as you can see below: enter image description here and i get this error for the website via free web hosting (the website could be seen here):

 [ERROR] Failed to import "" (Media) [ERROR] Failed to import "" (Media) [ERROR] Failed to import "" (Media) [ERROR] Failed to import "" (Media) [ERROR] Failed to import "" (Media) [ERROR] Failed to import "" (Media) [ERROR] Failed to import "" (Media) [ERROR] Failed to import "screenshot-newstore" (Media) [ERROR] Failed to import "newstore-demo-2" (Media) [ERROR] Failed to import "newstore-demo-3" (Media) [ERROR] Failed to import "newstore-demo-4" (Media)  

The log file could be shown here:

As it is free web hosting i share the user&pass of admin for …: user:admin: pass:ss123456 

So if possible take a look on it and share your viewpoints to me. Thanks.

Importing A Neural Network From Mathematica For Use In R

I am experimenting with platform interoperability between Mathematica and R.

My aim is to create an untrained Neural Network using Mathematica, export this network in MXNet format as a .json file, and import this network into R for a classification problem.

Creating the Network in Mathematica

Here i have created a basic neural network – this network is untrained. I have exported the network alongside the network parameters.

In mathematica the code is as follows.

dec=NetDecoder["Class",{"Chronic Kidney Disease","No Kidney Disease"}]  net =   NetInitialize@   NetChain[{BatchNormalizationLayer[], LinearLayer[20], Ramp,      DropoutLayer[0.1], LinearLayer[2], SoftmaxLayer[]},    "Input" -> 24, "Output" -> dec    ] 

There are 24 feature variables for the input and the output is the netdecoder. I then export this network.

Export["net.json", net, "MXNet"] 

This produces two files, one with the network, and another with the parameters. By using FilePrint we can visualise this


which returns

{     "nodes":[         {"op":"null","name":"Input","inputs":[]},         {"op":"null","name":"1.Scaling","inputs":[]},         {"op":"null","name":"1.Biases","inputs":[]},         {"op":"null","name":"1.MovingMean","inputs":[]},         {"op":"null","name":"1.MovingVariance","inputs":[]},         {"op":"BatchNorm","name":"1","attrs":{"eps":"0.001","momentum":"0.9","fix_gamma":"false","use_global_stats":"false","axis":"1","cudnn_off":"0"},"inputs":[[0,0,0],[1,0,0],[2,0,0],[3,0,0],[4,0,0]]},         {"op":"null","name":"2.Weights","inputs":[]},         {"op":"null","name":"2.Biases","inputs":[]},         {"op":"FullyConnected","name":"2","attrs":{"num_hidden":"20","no_bias":"False"},"inputs":[[5,0,0],[6,0,0],[7,0,0]]},         {"op":"relu","name":"3$  0","inputs":[[8,0,0]]},         {"op":"Dropout","name":"4$  0","attrs":{"p":"0.1","mode":"always","axes":"()"},"inputs":[[9,0,0]]},         {"op":"null","name":"5.Weights","inputs":[]},         {"op":"null","name":"5.Biases","inputs":[]},         {"op":"FullyConnected","name":"5","attrs":{"num_hidden":"2","no_bias":"False"},"inputs":[[10,0,0],[11,0,0],[12,0,0]]},         {"op":"softmax","name":"6$  0","attrs":{"axis":"1"},"inputs":[[13,0,0]]},         {"op":"identity","name":"Output","inputs":[[14,0,0]]}     ],     "arg_nodes":[0,1,2,3,4,6,7,11,12],     "heads":[[15,0,0]],     "attrs":{         "mxnet_version":["int",10400]     } } 

Importing the Network into R

Now we have an untrained network as a .json file in MXNet format.

We can import this using:

library(rjson) mydata <- fromJSON(file="net.json")  

The Problem

Im not sure how to process the exported net in R. Is it possible to use the imported untrained network from Mathematica, to then be used in R to train on some data?

What settings to use to export mysql table rows that I’ll be importing to another table with data using phpmyadmin

If I’m using phpmyadmin to manage mysql database, what settings should I use to export only two rows of data that I’ll be importing to another table with the same name that contains many other rows?

I used the quick option, but I’m getting an error that table already exists and nothing gets imported.

If I use the default custom option with the default settings, I get the same error message.

So, what’s the best settings to use to export settings that I’m going to import to another table?

Difficultly importing GeoTiff format

I downloaded Earth data from here. It is a GeoTiff file, which is a map of solar radiation falling on earth.

enter image description here

Mathematica claims to import GeoTiff files. However, when I import,

SetDirectory[NotebookDirectory[]] files = FileNames["*", "./diffuse/"][[1]] diffuse = Import[files, {"GeoTIFF", "Image"}] 

The output is an error:

LinkObject::linkd: Unable to communicate with closed link LinkObject['/Applications/',6300,8]. Import::fmterr: Cannot import data as GeoTIFF format. 

I can get the file to open using other GeoTiff programs such as QCIS. So it does seem to be a Mathematica issue. Any ideas? It is an error which I have not encountered before.